:root {
  color-scheme: light;
  --ink: #1d2522;
  --muted: #66736d;
  --line: #dbe2dc;
  --page: #f6f3ed;
  --panel: #ffffff;
  --panel-soft: #f8faf7;
  --green: #1f6f50;
  --green-dark: #123b2c;
  --blue: #2b6f9f;
  --amber: #b87921;
  --shadow: 0 20px 60px rgba(28, 43, 37, 0.13);
}

/* Live Florida Now dashboard refresh */
.lfn-dashboard {
  --lfn-navy: #111c2d;
  --lfn-navy-2: #18263b;
  --lfn-gold: #c6a247;
  --lfn-gold-2: #f0c85a;
  --lfn-purple: #5742c8;
  --lfn-bg: #f6f8fc;
  --lfn-text: #111827;
  --lfn-muted: #59667c;
  --lfn-line: #e6eaf2;
  --lfn-card: #ffffff;
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--lfn-bg);
  color: var(--lfn-text);
}

.lfn-dashboard h1,
.lfn-dashboard h2,
.lfn-dashboard h3,
.lfn-dashboard p {
  margin: 0;
  max-width: none;
}

.lfn-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  overflow-y: auto;
  padding: 28px 18px;
  background:
    radial-gradient(circle at top left, rgba(198, 162, 71, 0.18), transparent 18rem),
    linear-gradient(180deg, var(--lfn-navy), #0d1726);
  color: #ffffff;
}

.lfn-logo {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 0 8px 14px;
  text-align: center;
}

.lfn-logo-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 54px;
  border-bottom: 3px solid var(--lfn-gold);
  color: var(--lfn-gold-2);
  font-size: 2.1rem;
}

.lfn-logo strong,
.lfn-logo small {
  display: block;
  letter-spacing: 0.16em;
}

.lfn-logo strong {
  color: #ffffff;
  font-size: 1.12rem;
}

.lfn-logo small {
  margin-top: 5px;
  color: var(--lfn-gold-2);
  font-size: 0.72rem;
}

.lfn-nav {
  display: grid;
  gap: 8px;
}

.lfn-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-radius: 8px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.lfn-nav a span {
  display: grid;
  place-items: center;
  width: 20px;
  color: #ffffff;
}

.lfn-nav a.active,
.lfn-nav a:hover {
  background: linear-gradient(135deg, rgba(198, 162, 71, 0.98), rgba(240, 200, 90, 0.78));
  color: #111827;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.lfn-nav a.active span,
.lfn-nav a:hover span {
  color: #111827;
}

.help-card {
  display: grid;
  gap: 8px;
  margin-top: auto;
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
}

.help-card strong {
  color: #ffffff;
}

.help-card button,
.outline-purple {
  min-height: 42px;
  border: 1px solid var(--lfn-gold);
  border-radius: 8px;
  background: transparent;
  color: var(--lfn-gold-2);
  font-weight: 900;
}

.lfn-main {
  min-width: 0;
  padding: 30px 34px;
}

.lfn-footer {
  display: grid;
  gap: 10px;
  margin-top: 34px;
  border-top: 1px solid var(--lfn-line);
  padding-top: 18px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.45;
}

.lfn-footer div,
.lfn-footer nav {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
}

.lfn-footer strong {
  color: var(--lfn-text);
}

.lfn-footer a {
  color: var(--lfn-navy);
  font-weight: 900;
}

.lfn-footer p {
  color: var(--lfn-muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.lfn-topbar,
.topbar-actions,
.user-menu,
.card-header,
.summary-card,
.property-cell,
.recent-docs article,
.agent-list-modern article,
.date-list article,
.message-list article {
  display: flex;
  align-items: center;
}

.lfn-topbar {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.lfn-topbar h1 {
  color: var(--lfn-text);
  font-size: clamp(1.8rem, 2.4vw, 2.35rem);
  line-height: 1.1;
}

.lfn-topbar p {
  margin-top: 10px;
  color: var(--lfn-muted);
  font-size: 1.02rem;
}

.transaction-entry-topbar {
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.transaction-topbar-title {
  min-width: 320px;
  max-width: 620px;
}

.transaction-entry-topbar h1 {
  font-size: clamp(2rem, 3vw, 2.65rem);
}

.transaction-entry-topbar p {
  max-width: 600px;
  font-size: 1rem;
  line-height: 1.35;
}

.transaction-detail-topbar {
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
}

.transaction-detail-topbar .transaction-topbar-title {
  max-width: min(820px, 54vw);
}

.transaction-detail-topbar h1 {
  overflow: hidden;
  font-size: clamp(2rem, 3vw, 2.65rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-documents-page .transaction-detail-topbar h1 {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.transaction-detail-topbar p {
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.35;
  text-transform: capitalize;
}

.topbar-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: nowrap;
}

.transaction-topbar-actions {
  display: flex;
  align-items: center;
  justify-items: unset;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  gap: 16px;
}

.transaction-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: auto;
  padding-right: 16px;
  border-right: 1px solid #dce4ee;
}

.purple-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--lfn-navy);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(17, 28, 45, 0.2);
}

.transaction-action-buttons .purple-button,
.transaction-action-buttons .top-link {
  min-width: 0;
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.92rem;
  line-height: 1;
}

.transaction-action-buttons .transaction-cancel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #c8d6e5;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  color: var(--lfn-navy);
}

.transaction-action-buttons .transaction-archive-action {
  min-height: 40px;
  padding: 0 16px;
  box-shadow: none;
}

.transaction-action-buttons .purple-button {
  min-width: 168px;
}

.purple-button:hover {
  background: #233650;
}

.purple-button:disabled,
.outline-purple:disabled,
.ready-campaign-card button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.bell-button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 1.05rem;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(31, 45, 71, 0.1);
}

.bell-button span {
  position: absolute;
  top: -4px;
  right: -2px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #db3939;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
}

.user-menu {
  gap: 12px;
  min-height: 48px;
  border-left: 1px solid var(--lfn-line);
  padding-left: 16px;
  margin-left: auto;
}

.user-menu > div {
  display: grid;
  gap: 2px;
  line-height: 1.12;
}

.user-menu strong,
.user-menu small {
  display: block;
}

.user-photo,
.agent-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lfn-gold), #f7e4a4);
  color: var(--lfn-navy);
  font-weight: 900;
}

.user-photo.has-image {
  background-position: center;
  background-size: cover;
  color: transparent;
}

.user-menu small,
.recent-docs small,
.date-list small,
.message-list small,
.agent-list-modern small {
  color: var(--lfn-muted);
}

.user-menu a {
  color: var(--lfn-navy);
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.user-menu a:hover {
  color: #9a7425;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 22px;
}

.deadline-alerts {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.alert-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 10px;
  align-items: start;
  min-height: 154px;
  border: 1px solid var(--lfn-line);
  border-left: 4px solid var(--lfn-gold);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(38, 52, 82, 0.07);
}

.alert-card > div:not(.alert-card-actions) {
  min-width: 0;
  min-height: 74px;
}

.alert-card > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff5db;
  color: #ad7518;
  font-weight: 900;
}

.alert-card strong,
.alert-card small {
  display: block;
}

.alert-card strong {
  overflow: hidden;
  font-size: 0.96rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert-card small {
  margin-top: 4px;
  color: var(--lfn-muted);
  font-size: 0.82rem;
  line-height: 1.24;
}

.alert-card em {
  display: inline-flex;
  margin-top: 10px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.alert-card button {
  min-height: 36px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-weight: 900;
}

.alert-card-actions {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(118px, 1fr) minmax(76px, 0.55fr);
  gap: 8px;
  align-self: end;
  margin-top: 8px;
}

.alert-card-actions .compact-action,
.deadline-mini-actions .compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  white-space: nowrap;
}

.alert-card-actions .complete-deadline-action,
.deadline-mini-actions .complete-deadline-action {
  min-width: 0;
}

.alert-card-actions .outline-purple,
.deadline-mini-actions .outline-purple {
  min-width: 0;
}

.complete-deadline-action {
  border-color: #b9cce0;
  background: #ffffff;
  color: var(--lfn-navy);
}

.complete-deadline-action:hover {
  border-color: var(--lfn-navy);
  background: #eef5fb;
}

.complete-deadline-action:disabled {
  cursor: progress;
  opacity: 0.7;
}

.alert-card.urgent {
  border-left-color: #db3939;
}

.alert-card.urgent > span {
  background: #ffe7e7;
  color: #c43131;
}

.alert-card.warning {
  border-left-color: #f09734;
}

.summary-card,
.white-card {
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  background: var(--lfn-card);
  box-shadow: 0 18px 42px rgba(38, 52, 82, 0.08);
}

.summary-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 14px 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98)),
    var(--lfn-card);
  box-shadow:
    0 12px 26px rgba(30, 44, 69, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.summary-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.summary-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.summary-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(209, 219, 232, 0.86);
  border-radius: 10px;
  font-size: 0.96rem;
  font-weight: 900;
  box-shadow:
    0 8px 18px rgba(17, 28, 45, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.summary-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-icon.purple {
  background: #edf5fb;
  color: var(--lfn-navy);
}

.summary-icon.green {
  background: #edf5fb;
  color: var(--lfn-navy);
}

.summary-icon.gold {
  background: #edf5fb;
  color: var(--lfn-navy);
}

.summary-icon.blue {
  background: #edf4ff;
  color: var(--lfn-navy);
}

.summary-card strong,
.summary-card span,
.summary-card a {
  display: block;
}

.summary-card strong {
  color: var(--lfn-text);
  font-size: clamp(1.35rem, 1.65vw, 1.7rem);
  line-height: 0.95;
}

.summary-card span {
  max-width: none;
  margin: 0;
  color: var(--lfn-text);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.08;
}

.summary-card a,
.card-header a,
.card-link {
  color: var(--lfn-navy);
  font-size: 0.94rem;
  font-weight: 900;
}

.summary-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 2px;
  font-size: 0.82rem;
  line-height: 1;
  text-decoration: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.transaction-entry-card {
  grid-column: 1 / -1;
}

.manual-entry-intro-card,
.contract-autofill-disclosure {
  grid-column: 1 / -1;
}

.manual-entry-intro-card .card-header {
  align-items: flex-start;
}

.manual-entry-intro-card .card-header p {
  margin-top: 6px;
  color: var(--lfn-muted);
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.4;
}

.manual-entry-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
}

.manual-entry-summary article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--lfn-line);
  border-left: 3px solid var(--lfn-navy);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(248, 251, 253, 0.92), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.manual-entry-summary strong {
  color: var(--lfn-text);
  font-size: 0.98rem;
}

.manual-entry-summary span {
  color: var(--lfn-muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.manual-entry-summary .purple-button {
  align-self: center;
  min-height: 44px;
  min-width: 172px;
  white-space: nowrap;
}

.contract-autofill-disclosure {
  padding: 0;
}

.contract-autofill-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
}

.contract-autofill-disclosure summary::-webkit-details-marker {
  display: none;
}

.contract-autofill-disclosure summary > span {
  display: grid;
  gap: 4px;
}

.contract-autofill-disclosure summary strong {
  color: var(--lfn-text);
  font-size: 1.02rem;
}

.contract-autofill-disclosure summary small {
  color: var(--lfn-muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

.contract-autofill-disclosure summary em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #c8d6e5;
  border-radius: 8px;
  padding: 0 14px;
  background: #f8fbfd;
  color: var(--lfn-navy);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.contract-autofill-disclosure[open] summary {
  border-bottom: 1px solid #e4edf5;
}

.contract-autofill-disclosure[open] summary em {
  background: var(--lfn-navy);
  color: #ffffff;
}

.contract-autofill-body {
  padding: 18px 22px 22px;
}

.transaction-entry-form {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.home-photo-upload {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  border: 1.5px dashed #d5c281;
  border-radius: 8px;
  padding: 18px;
  background: #fffaf0;
  color: var(--lfn-navy);
  text-align: center;
  cursor: pointer;
}

.home-photo-upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.home-photo-upload span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--lfn-gold);
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 900;
}

.home-photo-upload strong,
.home-photo-upload small {
  display: block;
}

.home-photo-upload small {
  color: var(--lfn-muted);
}

.home-photo-upload.has-preview {
  background-position: center;
  background-size: cover;
  color: #ffffff;
}

.home-photo-upload.has-preview small,
.home-photo-upload.has-preview strong {
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(5, 31, 53, 0.44);
}

.entry-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.entry-fields label {
  display: grid;
  gap: 7px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.entry-fields input,
.entry-fields select,
.entry-fields textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--lfn-text);
  outline: 0;
  text-transform: none;
}

.entry-fields textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.entry-fields .wide-field {
  grid-column: 1 / -1;
}

.entry-fields .address-street-field,
.entry-fields .address-city-field {
  grid-column: span 2;
}

.entry-section-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e7edf4;
  padding-top: 14px;
  margin-top: 4px;
}

.entry-section-heading:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.entry-section-heading strong {
  color: var(--lfn-text);
  font-size: 0.96rem;
  line-height: 1.2;
  text-transform: none;
}

.entry-section-heading span {
  max-width: 560px;
  color: var(--lfn-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
  text-transform: none;
}

.transaction-entry-form > .purple-button {
  grid-column: 2;
  justify-self: start;
}

.white-card {
  padding: 22px;
  min-width: 0;
  overflow: hidden;
}

.transactions-card {
  grid-column: span 1;
}

.card-header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.transaction-card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 38px;
  width: auto;
  margin-top: 0;
  padding: 0 13px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.transaction-card-actions .purple-button {
  color: #ffffff;
}

.transaction-card-actions .outline-purple {
  color: var(--lfn-navy);
}

.transaction-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.transaction-search-panel label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--lfn-muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.transaction-search-panel input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 0 13px;
  background: #ffffff;
  color: var(--lfn-text);
  font-size: 0.95rem;
  font-weight: 800;
  outline: 0;
}

.transaction-search-panel input:focus {
  border-color: var(--lfn-navy);
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.1);
}

.transaction-search-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.transaction-search-tools small {
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.transaction-search-tools .compact-action[hidden] {
  display: none;
}

.card-header h2 {
  color: var(--lfn-text);
  font-size: 1.16rem;
}

.small-header h3 {
  font-size: 0.95rem;
}

.modern-table {
  display: grid;
  max-width: 100%;
  overflow-x: hidden;
}

.modern-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.72fr) minmax(0, 0.85fr) minmax(0, 0.72fr) minmax(0, 0.64fr);
  gap: 14px;
  align-items: center;
  min-height: 78px;
  min-width: 0;
  border-bottom: 1px solid var(--lfn-line);
  color: var(--lfn-text);
}

.modern-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agent-row-table {
  grid-template-columns: minmax(260px, 1.5fr) minmax(130px, 0.8fr) minmax(160px, 1fr) minmax(120px, 0.7fr) auto;
}

.agent-dashboard-grid {
  align-items: start;
}

.agent-focus-card {
  align-self: start;
}

.focus-list {
  display: grid;
  gap: 10px;
}

.focus-list article {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.focus-time {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 8px;
  background: #fff5db;
  color: #ad7518;
  font-size: 0.8rem;
  font-weight: 900;
}

.focus-list strong,
.focus-list small {
  display: block;
}

.focus-list small {
  margin-top: 4px;
  color: var(--lfn-muted);
}

.message-preview-card {
  align-self: start;
}

.modern-head {
  min-height: 34px;
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.transactions-card .modern-row {
  grid-template-columns: minmax(124px, 0.58fr) minmax(320px, 1.72fr) minmax(0, 0.78fr) minmax(0, 0.74fr) minmax(0, 0.58fr);
}

.transactions-card .modern-table {
  gap: 8px;
}

.transactions-card .modern-head {
  border: 1px solid transparent;
  padding: 0 14px;
}

.transactions-card .transaction-click-row {
  min-height: 86px;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 28, 45, 0.04);
}

.transactions-card .transaction-click-row:hover {
  border-color: #d6e0ec;
  background: #fbfdff;
  box-shadow: 0 16px 34px rgba(17, 28, 45, 0.07);
}

.transaction-row-agent,
.transaction-row-status,
.transaction-row-date,
.transaction-row-money {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.transaction-row-agent strong,
.transaction-row-date strong,
.transaction-row-money strong,
.transaction-row-agent small,
.transaction-row-status small,
.transaction-row-date small,
.transaction-row-money small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-row-agent strong,
.transaction-row-date strong,
.transaction-row-money strong {
  color: var(--lfn-text);
  font-size: 0.94rem;
  line-height: 1.15;
}

.transaction-row-agent small,
.transaction-row-status small,
.transaction-row-date small,
.transaction-row-money small {
  color: var(--lfn-muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.transaction-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.transaction-status-pill .dot {
  flex: 0 0 auto;
  margin-right: 7px;
}

.transaction-status-pill.is-active,
.transaction-status-pill.is-pre_offer {
  background: #eaf7ef;
  color: #227647;
}

.transaction-status-pill.is-pending,
.transaction-status-pill.is-under_contract {
  background: #eaf3ff;
  color: #1d5f94;
}

.transaction-status-pill.is-sold {
  background: #f0edff;
  color: #6750c9;
}

.transaction-status-pill.is-canceled,
.transaction-status-pill.is-withdrawn,
.transaction-status-pill.is-terminated,
.transaction-status-pill.is-archived {
  background: #eef2f6;
  color: #5f6c7c;
}

.transaction-row-date.urgent strong,
.transaction-row-date.urgent small {
  color: #b3422f;
}

.transaction-row-date.warning strong,
.transaction-row-date.warning small {
  color: #a16100;
}

.transaction-row-date.sold strong {
  color: #6750c9;
}

.transaction-row-date.canceled strong,
.transaction-row-date.withdrawn strong,
.transaction-row-date.terminated strong,
.transaction-row-money small {
  color: #667487;
}

.broker-pending-table .modern-row {
  grid-template-columns: minmax(0, 1.58fr) minmax(0, 0.78fr) minmax(0, 0.74fr) minmax(0, 0.82fr) minmax(0, 0.58fr);
}

.agent-deadline-row,
#agentTransactionTable .modern-head {
  grid-template-columns: minmax(230px, 1.35fr) minmax(90px, 0.58fr) minmax(180px, 1fr) minmax(105px, 0.65fr);
}

.property-cell {
  gap: 14px;
  min-width: 0;
}

.property-link {
  color: inherit;
  text-decoration: none;
}

.property-text-link {
  min-width: 0;
}

.property-text-link:hover strong {
  color: var(--lfn-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.property-cell strong,
.property-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-cell small {
  margin-top: 5px;
  color: var(--lfn-muted);
}

.property-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 64px;
  height: 54px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 28, 45, 0.08), rgba(198, 162, 71, 0.18)),
    #eef5fb;
  color: var(--lfn-navy);
}

.property-thumb::before {
  content: "⌂";
  font-size: 1.15rem;
  font-weight: 900;
}

.property-thumb.has-photo {
  overflow: hidden;
  background: #eef5fb;
}

.property-thumb.has-photo::before {
  content: "";
}

.property-thumb img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.modern-row button {
  border: 0;
  background: transparent;
  color: var(--lfn-muted);
  font-size: 1.3rem;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 10px;
  border-radius: 50%;
}

.green-dot {
  background: #4eb86a;
}

.blue-dot {
  background: #547bd8;
}

.violet-dot {
  background: #7c63d9;
}

.orange-dot {
  background: #f09734;
}

.gray-dot {
  background: #7a8797;
}

.card-link {
  display: inline-block;
  margin-top: 18px;
}

.modern-upload {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 260px;
  border: 1.5px dashed #b7b0e8;
  border-radius: 8px;
  padding: 24px;
  background: #fbfbff;
  text-align: center;
  cursor: pointer;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.modern-upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.modern-upload span {
  color: var(--lfn-navy);
  font-size: 3rem;
  line-height: 1;
}

.modern-upload em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 22px;
  background: var(--lfn-navy);
  color: #ffffff;
  font-style: normal;
  font-weight: 900;
}

.recent-docs {
  margin-top: 22px;
}

.recent-docs article {
  gap: 12px;
  min-height: 50px;
  margin-top: 12px;
}

.recent-docs article > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid currentColor;
  font-size: 0.66rem;
  font-weight: 900;
}

.file-icon.red {
  color: #e43f3f;
}

.file-icon.blue-file {
  color: #4a74df;
}

.compact-agent-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.compact-agent-form input,
.compact-agent-form select {
  min-height: 44px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
}

.agent-list-modern,
.commission-modern,
.progress-list,
.quick-links,
.date-list,
.message-list,
.settings-modern {
  display: grid;
  gap: 12px;
}

.agent-list-modern article,
.agent-roster-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--lfn-line);
  padding-top: 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  color: inherit;
}

.agent-list-modern article:first-child,
.agent-roster-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.agent-roster-row {
  grid-template-columns: minmax(250px, 1.35fr) minmax(190px, 1fr) minmax(120px, 0.5fr) minmax(92px, 0.42fr) minmax(84px, 0.34fr);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 68px;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.agent-roster-row + .agent-roster-row {
  margin-top: 4px;
}

.agent-roster-row:hover {
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px #dbe5ef;
}

.image-avatar {
  object-fit: cover;
}

img.image-avatar {
  display: block;
}

.agent-roster-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.agent-roster-info > strong {
  display: block;
  color: var(--lfn-text);
  font-size: 1rem;
  line-height: 1.15;
}

.agent-roster-info small {
  display: block;
  color: var(--lfn-muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agent-roster-row .agent-avatar {
  width: 42px;
  height: 42px;
  font-size: 0.82rem;
}

.agent-roster-head {
  display: grid;
  grid-template-columns: minmax(250px, 1.35fr) minmax(190px, 1fr) minmax(120px, 0.5fr) minmax(92px, 0.42fr) minmax(84px, 0.34fr);
  gap: 12px;
  border-bottom: 1px solid var(--lfn-line);
  padding: 0 14px 12px;
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-roster-head span:nth-child(3),
.agent-roster-head span:nth-child(4),
.agent-roster-head span:nth-child(5) {
  text-align: right;
}

.agent-table-list {
  gap: 0;
}

.agent-roster-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.agent-roster-contact,
.agent-roster-phone,
.agent-split-pill {
  display: grid;
  align-content: center;
  min-width: 0;
  color: var(--lfn-muted);
  font-size: 0.82rem;
  line-height: 1.25;
}

.agent-roster-contact {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-roster-phone {
  justify-self: end;
  color: var(--lfn-text);
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.agent-roster-contact small {
  display: block;
  margin-top: 3px;
  color: var(--lfn-muted);
}

.agent-split-pill {
  justify-self: end;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  min-width: 0;
  padding: 7px 9px;
  background: #f7f9fc;
  color: var(--lfn-text);
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.agent-expiration-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.agent-expiration {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-self: start;
  min-height: 28px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  padding: 0 8px;
  background: #f7f9fc;
  color: var(--lfn-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.agent-expiration strong {
  margin-right: 6px;
  color: var(--lfn-text);
  font-size: inherit;
}

.agent-expiration.warn {
  border-color: #f1d28b;
  background: #fff8e8;
  color: #9b721f;
}

.agent-expiration.danger {
  border-color: #f0b6b6;
  background: #fff0f0;
  color: #b43636;
}

.agent-list-modern em,
.agent-roster-row > em {
  align-self: center;
  justify-self: end;
  min-width: 76px;
  border-radius: 8px;
  min-width: 0;
  padding: 7px 10px;
  background: #e7f7eb;
  color: #2e9c51;
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
  text-transform: capitalize;
  white-space: nowrap;
}

.agent-list-modern em.warn {
  background: #fff3d9;
  color: #b47a1d;
}

.commission-modern {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.commission-modern article {
  display: grid;
  gap: 5px;
  border-radius: 8px;
  padding: 14px;
  background: #f7f8fc;
}

.commission-modern span,
.progress-list span {
  color: var(--lfn-muted);
  font-weight: 800;
}

.commission-modern strong {
  font-size: 1.35rem;
}

.progress-list div {
  display: grid;
  grid-template-columns: 120px minmax(100px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.pipeline-mini {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.pipeline-mini article {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 14px;
  background: #f7f8fc;
}

.pipeline-mini span {
  color: var(--lfn-navy);
  font-size: 1.55rem;
  font-weight: 900;
}

.quick-links a {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--lfn-line);
  padding-top: 12px;
  color: var(--lfn-text);
  font-weight: 800;
}

.date-list article {
  gap: 14px;
  border-bottom: 1px solid var(--lfn-line);
  padding-bottom: 12px;
  align-items: flex-start;
}

.date-list article > span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: #f7f8fc;
  color: var(--lfn-navy);
  font-weight: 900;
}

.date-list article > span strong {
  font-size: 0.68rem;
}

.date-list div {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.date-list div strong,
.date-list div small {
  overflow-wrap: anywhere;
}

.date-list em {
  color: var(--lfn-muted);
  font-style: normal;
  white-space: nowrap;
}

.message-list article {
  gap: 12px;
}

.message-list article > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e4f4ea;
  color: #23814b;
  font-weight: 900;
}

.message-list div {
  flex: 1;
}

.simple-message-panel {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 86px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.simple-message-panel > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-weight: 900;
}

.simple-message-panel strong,
.simple-message-panel p {
  display: block;
}

.simple-message-panel p {
  margin-top: 4px;
  color: var(--lfn-muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

.message-compose-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  text-decoration: none;
}

.outline-purple {
  width: 100%;
  margin-top: 16px;
  color: var(--lfn-navy);
}

.top-link {
  width: auto;
  min-height: 46px;
  margin-top: 0;
  padding: 0 18px;
}

.topbar-actions > .purple-button,
.topbar-actions > .top-link,
.topbar-actions > button.outline-purple {
  min-height: 42px;
  padding: 0 14px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.tax-year-control {
  display: grid;
  gap: 5px;
  min-width: 132px;
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tax-year-control select {
  min-height: 42px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 0.95rem;
  font-weight: 900;
}

.settings-modern label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 14px;
}

.settings-modern strong,
.settings-modern small {
  display: block;
}

.settings-modern small {
  color: var(--lfn-muted);
}

.settings-modern input {
  width: 20px;
  height: 20px;
  accent-color: var(--lfn-gold);
}

.broker-auth-checklist {
  display: grid;
  gap: 14px;
}

.broker-auth-checklist p {
  color: var(--lfn-muted);
  line-height: 1.5;
}

.broker-auth-checklist ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 1.25rem;
  color: var(--lfn-text);
  line-height: 1.45;
}

.broker-auth-checklist li::marker {
  color: var(--lfn-gold);
  font-weight: 900;
}

.broker-profile-card {
  grid-column: 1 / -1;
}

.broker-profile-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
  text-transform: none;
}

.broker-profile-preview strong,
.broker-profile-preview small {
  display: block;
}

.broker-profile-preview small {
  margin-top: 4px;
  color: var(--lfn-muted);
}

.broker-review-card {
  grid-column: 1 / -1;
  align-self: start;
}

.upload-card#documents {
  grid-column: 1 / -1;
}

.transaction-work-grid .white-card {
  min-height: 0;
}

.transaction-work-grid {
  gap: 14px;
  margin-top: 12px;
}

.transaction-deadlines-card {
  grid-column: 1 / -1;
  padding: 18px 20px 20px;
}

.transaction-work-grid .card-header {
  align-items: center;
  margin-bottom: 14px;
}

.transaction-work-grid .card-header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  padding: 0 12px;
  background: #f8fbff;
  color: var(--lfn-navy);
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.transaction-work-grid .card-header a:hover {
  border-color: #b9cce0;
  background: #eef5fb;
}

.review-list,
.upload-checklist {
  display: grid;
  gap: 12px;
}

.review-list article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #fffaf0;
}

.review-list article .mini-action,
.review-list article button {
  grid-column: 2;
  justify-self: start;
  margin-top: 4px;
}

.review-list strong,
.review-list small {
  display: block;
}

.review-list small {
  margin-top: 4px;
  color: var(--lfn-muted);
}

.review-list button {
  min-height: 38px;
  border: 1px solid var(--lfn-gold);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-weight: 900;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--lfn-gold);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-weight: 900;
  white-space: nowrap;
}

.document-context-note {
  display: grid;
  gap: 8px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 16px;
  background: #fffaf0;
}

.document-context-note span {
  color: var(--lfn-muted);
  line-height: 1.4;
}

.document-context-note a {
  color: var(--lfn-navy);
  font-weight: 900;
}

.document-checklist-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  border: 1px solid #d7e2ef;
  border-radius: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at top right, rgba(31, 122, 79, 0.09), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fbfd);
  box-shadow: 0 12px 28px rgba(7, 48, 79, 0.06);
}

.document-checklist-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
}

.document-checklist-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--lfn-text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.15;
}

.document-checklist-eyebrow {
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-checklist-summary em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff4e5;
  color: #a76617;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.document-checklist-summary em.is-complete {
  background: #edf7f1;
  color: #1f7a4f;
}

.document-checklist-meter {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e8eef6;
}

.document-checklist-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f7a4f, #66b883);
}

.document-checklist-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.document-checklist-groups section {
  display: grid;
  gap: 10px;
  border: 1px solid #dfe7f0;
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.document-checklist-groups section:only-child {
  grid-column: 1 / -1;
}

.document-checklist-groups h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.document-checklist-groups h3 small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
}

.document-checklist-groups section > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.document-checklist-groups section:only-child > div {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.document-checklist-groups section > div > span,
.document-checklist-groups section > div > button {
  display: inline-grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  padding: 0 11px;
  background: #f8fbfd;
  color: var(--lfn-text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  text-align: left;
}

.document-checklist-groups section > div > button {
  cursor: pointer;
}

.document-checklist-groups section > div > button:disabled {
  cursor: default;
}

.document-checklist-groups button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-checklist-groups button small {
  color: var(--lfn-muted);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.document-checklist-groups i {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e8eef6;
  color: var(--lfn-muted);
  font-style: normal;
  font-weight: 950;
}

.document-checklist-groups .is-uploaded {
  border-color: #bdddc8;
  background: #effaf3;
  color: #1f7a4f;
}

.document-checklist-groups .is-uploaded i {
  background: #d9f0e2;
  color: #1f7a4f;
}

.document-checklist-groups .is-manual-ready {
  border-color: #c5d7f0;
  background: #f1f6fd;
  color: var(--lfn-navy);
}

.document-checklist-groups .is-manual-ready i {
  background: #dbe9fb;
  color: var(--lfn-navy);
}

.document-checklist-groups .is-missing {
  border-color: #dfe7f0;
  color: #667487;
}

.document-checklist-groups .is-optional {
  color: #667487;
}

.agent-doc-upload-card {
  margin-top: 18px;
}

.deal-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.status-badge {
  justify-self: start;
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff5db;
  color: #ad7518;
  font-size: 0.78rem;
  font-weight: 900;
}

.transaction-doc-dropzone {
  min-height: 210px;
}

.transaction-edit-card {
  align-self: start;
}

.transaction-documents-card {
  grid-column: 1 / -1;
}

.transaction-document-summary-card {
  grid-column: 1 / -1;
}

.transaction-document-summary {
  display: grid;
  gap: 14px;
}

.transaction-document-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.transaction-document-summary-grid article {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 13px 14px;
  background: #fbfdff;
}

.transaction-document-summary-grid span {
  overflow: hidden;
  color: var(--lfn-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.transaction-document-summary-grid strong {
  color: var(--lfn-navy);
  font-size: 1.34rem;
  line-height: 1;
}

.transaction-document-summary > .compact-action {
  justify-self: start;
  width: auto;
  margin-top: 0;
}

.transaction-documents-workspace {
  display: grid;
  gap: 18px;
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid #d7e1eb;
  border-radius: 7px;
  margin: 0 0 18px;
  padding: 20px 20px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.94)),
    #ffffff;
  box-shadow: 0 12px 28px rgba(7, 48, 79, 0.05);
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar .transaction-topbar-title {
  display: grid;
  gap: 8px;
  min-width: 0;
  max-width: none;
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar h1 {
  overflow: hidden;
  color: var(--lfn-navy, var(--blue));
  font-size: clamp(1.72rem, 2.35vw, 2.25rem);
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 0;
  align-items: center;
  margin: 0;
  color: #526173;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p > * {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p > * + *::before {
  content: "";
  flex: 0 0 auto;
  width: 3px;
  height: 3px;
  border-radius: 999px;
  margin: 0 9px;
  background: #9aa8ba;
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p > span:first-child {
  color: var(--lfn-navy, var(--blue));
  font-weight: 950;
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p a {
  color: var(--lfn-navy, var(--blue));
  font-weight: 950;
}

body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p a:hover,
body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p a:focus {
  color: #0d1726;
  outline: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.transaction-documents-page .lfn-dashboard .transaction-header-status-label {
  gap: 0;
}

body.transaction-documents-page .lfn-dashboard .transaction-header-status-select {
  min-height: 26px;
  border: 1px solid #c9d4e2;
  border-radius: 5px;
  padding: 0 26px 0 8px;
  background: #f7f9fc;
  color: var(--lfn-navy, var(--blue));
  cursor: pointer;
  font: inherit;
  font-weight: 950;
  line-height: 1;
}

body.transaction-documents-page .lfn-dashboard .transaction-header-status-select:focus {
  border-color: rgba(7, 48, 79, 0.42);
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.08);
  outline: 0;
}

body.transaction-documents-page .lfn-dashboard .transaction-topbar-actions {
  justify-content: flex-end;
  min-width: 0;
}

body.transaction-documents-page .lfn-dashboard .transaction-action-buttons {
  gap: 8px;
  border-right: 0;
  padding-right: 0;
}

.transaction-documents-hero-card {
  display: grid;
  gap: 18px;
}

.transaction-documents-hero-card > div {
  display: grid;
  gap: 14px;
}

.transaction-documents-hero-card h2 {
  margin: 0;
  color: var(--lfn-text);
  font-size: clamp(1.55rem, 2.2vw, 2.35rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.transaction-documents-hero-card h2 span,
.transaction-documents-hero-card h2 small {
  display: block;
}

.transaction-documents-hero-card h2 small {
  margin-top: 6px;
  color: var(--lfn-muted);
  font-size: 1rem;
  line-height: 1.25;
}

.transaction-documents-hero-card .deal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.transaction-documents-hero-card .deal-stats article {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #dbe5ef;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fbfdff;
}

.transaction-documents-hero-card .deal-stats span {
  overflow: hidden;
  color: var(--lfn-muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.transaction-documents-hero-card .deal-stats strong {
  overflow: hidden;
  color: var(--lfn-navy);
  font-size: 0.96rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-documents-hero-card .document-checklist-panel {
  margin: 2px 0 0;
  border-radius: 10px;
  padding: 14px;
  box-shadow: none;
}

.transaction-documents-hero-card .document-checklist-summary {
  gap: 8px 14px;
}

.transaction-documents-hero-card .document-checklist-summary strong {
  font-size: clamp(1rem, 1.35vw, 1.22rem);
}

.transaction-documents-hero-card .document-checklist-summary em {
  min-height: 28px;
  padding: 0 11px;
  font-size: 0.74rem;
}

.transaction-documents-hero-card .document-checklist-meter {
  height: 8px;
}

.transaction-documents-hero-card .document-checklist-groups section {
  border-radius: 8px;
  padding: 12px;
}

.transaction-documents-hero-card .document-checklist-groups section:only-child > div {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.transaction-documents-hero-card .document-checklist-groups section > div > button {
  min-height: 32px;
  border-radius: 7px;
  padding: 0 9px;
  font-size: 0.76rem;
}

@media (max-width: 760px) {
  body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 18px;
  }

  body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar h1 {
    white-space: normal;
  }

  body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p {
    gap: 7px 10px;
  }

  body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p > * + *::before {
    display: none;
  }

  body.transaction-documents-page .lfn-dashboard .transaction-topbar-actions,
  body.transaction-documents-page .lfn-dashboard .transaction-action-buttons {
    justify-content: flex-start;
  }

  .transaction-documents-hero-card .deal-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  body.transaction-documents-page .lfn-dashboard .transaction-detail-topbar p > * {
    white-space: normal;
  }

  .transaction-documents-hero-card .deal-stats {
    grid-template-columns: 1fr;
  }
}

.transaction-documents-page .transaction-documents-card {
  overflow: visible;
  padding-top: 18px;
}

.transaction-documents-page .transaction-documents-card .card-header {
  align-items: start;
  border-bottom: 0;
  padding-bottom: 8px;
}

.card-kicker {
  margin-top: 5px;
  color: var(--lfn-muted);
  font-size: 0.85rem;
  font-weight: 750;
  line-height: 1.35;
}

.transaction-documents-card .compact-doc-dropzone {
  min-height: 46px;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  border: 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #d7e1eb;
  border-radius: 0;
  margin: 4px 0 0;
  padding: 8px 0;
  background: #ffffff;
  box-shadow: none;
}

.transaction-documents-card .transaction-doc-dropzone span {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.transaction-documents-card .compact-doc-dropzone strong {
  color: var(--lfn-navy, var(--blue));
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.transaction-documents-card .compact-doc-dropzone small {
  display: none;
}

.transaction-documents-card .compact-doc-dropzone em {
  min-height: 30px;
  border-radius: 6px;
  padding: 0 12px;
  background: #0b3f63;
  color: #ffffff;
  font-size: 0.72rem;
}

.transaction-extraction-card {
  grid-column: 1 / -1;
}

.transaction-detail-form {
  display: grid;
  gap: 16px;
}

.transaction-form-section {
  display: grid;
  gap: 13px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.transaction-form-section h3 {
  margin: 0;
  color: var(--lfn-text);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.transaction-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.transaction-detail-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--lfn-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.transaction-detail-form input,
.transaction-detail-form select,
.transaction-detail-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  padding: 0 12px;
  background: #fbfcff;
  color: var(--lfn-text);
  font-size: 0.95rem;
  font-weight: 700;
  outline: 0;
  text-transform: none;
}

.transaction-detail-form input[type="date"] {
  color: var(--lfn-text);
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0;
  -webkit-text-fill-color: var(--lfn-text);
}

.transaction-detail-form input[type="date"]::-webkit-datetime-edit,
.transaction-detail-form input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.transaction-detail-form input[type="date"]::-webkit-datetime-edit-text,
.transaction-detail-form input[type="date"]::-webkit-datetime-edit-month-field,
.transaction-detail-form input[type="date"]::-webkit-datetime-edit-day-field,
.transaction-detail-form input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--lfn-text);
}

.lfn-dashboard input.date-field-empty[type="date"]:not(:focus),
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus) {
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.lfn-dashboard input.date-field-empty[type="date"]:not(:focus)::-webkit-datetime-edit,
.lfn-dashboard input.date-field-empty[type="date"]:not(:focus)::-webkit-datetime-edit-fields-wrapper,
.lfn-dashboard input.date-field-empty[type="date"]:not(:focus)::-webkit-datetime-edit-text,
.lfn-dashboard input.date-field-empty[type="date"]:not(:focus)::-webkit-datetime-edit-month-field,
.lfn-dashboard input.date-field-empty[type="date"]:not(:focus)::-webkit-datetime-edit-day-field,
.lfn-dashboard input.date-field-empty[type="date"]:not(:focus)::-webkit-datetime-edit-year-field,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit-fields-wrapper,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit-text,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit-month-field,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit-day-field,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit-year-field,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit-hour-field,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit-minute-field,
.lfn-dashboard input.date-field-empty[type="datetime-local"]:not(:focus)::-webkit-datetime-edit-ampm-field {
  color: transparent;
}

.transaction-detail-form textarea {
  min-height: 110px;
  padding: 12px;
  resize: vertical;
}

.transaction-detail-form input:focus,
.transaction-detail-form select:focus,
.transaction-detail-form textarea:focus {
  border-color: var(--lfn-navy);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.1);
}

.transaction-detail-form input[readonly] {
  border-color: #e5ebf3;
  background: #f3f6fa;
  color: var(--lfn-navy);
}

.transaction-detail-form .wide-field {
  grid-column: 1 / -1;
}

.transaction-detail-form > .form-actions {
  border-top: 1px solid #e7eef6;
  padding-top: 4px;
}

.transaction-detail-page .deal-detail-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.transaction-detail-page .transaction-edit-card {
  grid-column: 1 / -1;
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.transaction-detail-page .transaction-edit-card > .card-header {
  min-height: 56px;
  border-bottom: 1px solid #d9dee6;
  padding: 0 24px;
}

.transaction-detail-page .transaction-edit-card > .card-header h2 {
  font-size: 1rem;
}

.transaction-detail-page .transaction-detail-form {
  gap: 0;
  padding: 0 16px 18px;
}

.transaction-detail-page .transaction-form-section {
  border: 0;
  border-radius: 0;
  border-top: 1px solid #eef2f6;
  padding: 18px 0;
}

.transaction-detail-page .transaction-form-section:first-child {
  border-top: 0;
}

.transaction-detail-page .transaction-form-section h3 {
  color: #333333;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}

.transaction-detail-page .transaction-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 16px;
}

.transaction-detail-page .transaction-detail-form label {
  position: relative;
  gap: 0;
  min-height: 58px;
  border: 1px solid #d4d9df;
  border-radius: 4px;
  padding: 9px 11px 7px;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.transaction-detail-page .transaction-detail-form label:focus-within {
  border-color: #0077ff;
  box-shadow: 0 0 0 1px #0077ff;
}

.transaction-detail-page .transaction-detail-form label span {
  margin-bottom: 4px;
  line-height: 1.1;
}

.transaction-detail-page .transaction-detail-form input,
.transaction-detail-page .transaction-detail-form select,
.transaction-detail-page .transaction-detail-form textarea {
  min-height: 24px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: #2f343a;
  font-size: 0.86rem;
  font-weight: 500;
}

.transaction-detail-page .transaction-detail-form input:focus,
.transaction-detail-page .transaction-detail-form select:focus,
.transaction-detail-page .transaction-detail-form textarea:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.transaction-detail-page .transaction-detail-form textarea {
  min-height: 72px;
  padding-top: 2px;
}

.transaction-detail-page .transaction-detail-form .wide-field {
  grid-column: span 2;
}

.transaction-detail-page .transaction-form-section:first-child .wide-field,
.transaction-detail-page .transaction-detail-form label:has(textarea) {
  grid-column: 1 / -1;
}

.transaction-detail-page .transaction-detail-deadline-panel {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.transaction-detail-page .transaction-detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.transaction-detail-page .transaction-detail-section-header strong {
  color: #333333;
  font-size: 1.05rem;
}

.transaction-detail-page .transaction-detail-section-header a {
  color: var(--lfn-navy, var(--blue));
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.transaction-detail-page #transactionDeadlineList.deadline-mini-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.transaction-detail-page #transactionDeadlineList.deadline-mini-list article {
  border: 1px solid #d9e3ee;
  border-radius: 6px;
  padding: 10px;
  background: #fbfdff;
}

.transaction-detail-page .transaction-detail-form > .form-actions {
  grid-column: 1 / -1;
  border-top: 1px solid #eef2f6;
  padding: 16px 0 0;
}

@media (max-width: 980px) {
  .transaction-detail-page .transaction-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transaction-detail-page .transaction-detail-form .wide-field,
  .transaction-detail-page .transaction-form-section:first-child .wide-field {
    grid-column: 1 / -1;
  }

  .transaction-detail-page #transactionDeadlineList.deadline-mini-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .transaction-detail-page .transaction-form-grid {
    grid-template-columns: 1fr;
  }

  .transaction-detail-page .transaction-edit-card > .card-header,
  .transaction-detail-page .transaction-detail-section-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.broker-notes {
  width: 100%;
  min-height: 230px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 14px;
  resize: vertical;
  color: var(--lfn-text);
}

.agent-dropzone {
  min-height: 230px;
}

.upload-checklist {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.upload-checklist label {
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--lfn-text);
  font-weight: 800;
}

.upload-checklist input {
  width: 18px;
  height: 18px;
  accent-color: var(--lfn-gold);
}

.scan-dropzone {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  justify-items: start;
  place-items: unset;
  align-items: center;
  min-height: 132px;
  border-style: solid;
  padding: 22px 26px;
  background:
    linear-gradient(180deg, rgba(237, 245, 251, 0.72), rgba(255, 255, 255, 0.96)),
    #ffffff;
  text-align: left;
}

.scan-dropzone span {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-size: 1.7rem;
}

.scan-dropzone strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--lfn-text);
  font-size: 1.08rem;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-dropzone small {
  grid-column: 2;
  max-width: 760px;
  color: var(--lfn-muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.scan-dropzone em {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  min-height: 40px;
  padding: 0 18px;
  white-space: nowrap;
}

.scan-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.scan-status article {
  display: grid;
  align-content: start;
  gap: 5px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.scan-status article.complete {
  border-color: #dbe5ef;
  border-left: 3px solid #3f8f5a;
  background: #ffffff;
}

.scan-status strong,
.scan-status span {
  display: block;
}

.scan-status span {
  color: var(--lfn-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.scan-status .mini-action {
  justify-self: start;
  margin-top: 4px;
}

.extraction-card {
  margin-top: 18px;
}

.extraction-disclosure {
  padding: 0;
  overflow: hidden;
}

.extraction-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.extraction-disclosure summary::-webkit-details-marker {
  display: none;
}

.extraction-disclosure summary span {
  color: var(--lfn-text);
  font-size: 1rem;
  font-weight: 900;
}

.extraction-disclosure summary em {
  border-radius: 999px;
  padding: 6px 10px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 900;
}

.extraction-disclosure summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f3f6fa;
  color: var(--lfn-navy);
  font-weight: 900;
}

.extraction-disclosure[open] summary {
  border-bottom: 1px solid #e7edf4;
}

.extraction-disclosure[open] summary::after {
  content: "−";
}

.extraction-disclosure > div {
  margin: 16px 18px 18px;
}

.extraction-status-panel {
  display: grid;
  gap: 12px;
}

.extraction-status-banner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #cfe5d7;
  border-radius: 8px;
  padding: 14px;
  background: #f3fbf6;
}

.extraction-status-banner > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #dff3e7;
  color: #23814b;
  font-weight: 900;
}

.extraction-status-banner strong,
.extraction-status-banner p {
  display: block;
}

.extraction-status-banner p {
  margin-top: 4px;
  color: var(--lfn-muted);
  line-height: 1.4;
}

.extraction-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.extraction-status-chips span {
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  padding: 7px 10px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 0.82rem;
  font-weight: 900;
}

.extraction-review {
  display: grid;
  gap: 16px;
}

.extraction-review-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #d8e6d2;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f5fbf1;
}

.extraction-review-banner strong {
  color: #286341;
  font-size: 0.92rem;
  white-space: nowrap;
}

.extraction-review-banner span {
  color: var(--lfn-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.extraction-summary {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) repeat(3, minmax(160px, 0.75fr));
  gap: 12px;
}

.extraction-summary article,
.extraction-review-section article {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #ffffff;
}

.extraction-summary article {
  min-height: 108px;
  padding: 16px;
}

.extraction-summary article.featured {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 12px 26px rgba(38, 52, 82, 0.06);
}

.extraction-review-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.extraction-review-section {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
  overflow: hidden;
}

.extraction-review-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e8eef6;
  padding: 13px 14px;
  background: #f8fbff;
}

.extraction-review-section h3 {
  margin: 0;
  color: var(--lfn-text);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.extraction-review-section header span {
  color: var(--lfn-muted);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.extraction-review-section > div {
  display: grid;
  gap: 0;
}

.extraction-review-section article {
  grid-template-columns: minmax(150px, 0.48fr) minmax(0, 1fr) auto;
  align-items: center;
  min-height: 58px;
  border-width: 0 0 1px;
  border-radius: 0;
  padding: 11px 14px;
}

.extraction-review-section article:last-child {
  border-bottom: 0;
}

.extraction-review span,
.extraction-grid span {
  color: var(--lfn-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.extraction-review strong,
.extraction-grid strong {
  color: var(--lfn-text);
  line-height: 1.25;
  overflow-wrap: break-word;
}

.extraction-review-section strong {
  font-size: 0.96rem;
}

.extraction-review em,
.extraction-grid em {
  justify-self: start;
  border-radius: 8px;
  padding: 5px 8px;
  background: #edf6f1;
  color: #23814b;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
}

.extraction-review-note {
  margin: 0;
  border: 1px solid #e3eaf3;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fbfd;
  color: var(--lfn-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.extraction-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.extraction-grid article {
  display: grid;
  gap: 7px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.extraction-grid span {
  color: var(--lfn-muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.extraction-grid strong {
  color: var(--lfn-text);
  line-height: 1.25;
}

.extraction-grid em {
  justify-self: start;
  border-radius: 999px;
  padding: 5px 8px;
  background: #edf6f1;
  color: #23814b;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
}

.transaction-extraction-review {
  display: grid;
  gap: 14px;
}

.transaction-extraction-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fbfd;
}

.transaction-extraction-banner strong {
  color: var(--lfn-text);
  font-size: 0.98rem;
}

.transaction-extraction-banner em {
  border-radius: 999px;
  padding: 6px 10px;
  background: #edf6f1;
  color: #23814b;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: capitalize;
}

.transaction-extraction-section {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.transaction-extraction-section h3 {
  margin: 0;
  color: var(--lfn-text);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.transaction-extraction-section > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  overflow: hidden;
}

.transaction-extraction-section article {
  display: grid;
  grid-template-columns: minmax(135px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 46px;
  border-right: 0;
  border-bottom: 1px solid #e7edf4;
  padding: 11px 14px;
  background: #ffffff;
}

.transaction-extraction-section article:last-child {
  border-bottom: 0;
}

.transaction-extraction-section span {
  color: var(--lfn-muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.25;
  text-transform: uppercase;
}

.transaction-extraction-section strong {
  min-width: 0;
  color: var(--lfn-text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-page-card {
  align-self: start;
}

.agents-page-grid {
  grid-template-columns: minmax(0, 1fr);
}

.agents-page-grid .admin-page-card {
  width: 100%;
}

.agent-profile-grid {
  grid-template-columns: minmax(0, 1fr);
}

.agent-profile-grid .admin-page-card {
  width: 100%;
}

.agent-page-form {
  display: grid;
  gap: 16px;
}

.compact-agent-form {
  gap: 14px;
  grid-template-columns: 1fr;
}

.compact-agent-form .agent-form-grid {
  align-items: end;
}

.compact-agent-form textarea {
  min-height: 78px;
}

.agent-form-heading {
  margin: 8px 0 -2px;
  padding-top: 12px;
  border-top: 1px solid #e6eef6;
  color: var(--lfn-text);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-primary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-inline-headshot {
  display: grid;
  gap: 7px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-inline-headshot-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.agent-form-section {
  display: grid;
  gap: 12px;
  border: 1px solid #e3ebf3;
  border-radius: 8px;
  padding: 16px;
  background: #fbfcff;
}

.agent-form-section h3 {
  margin: 0;
  color: var(--lfn-text);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.agent-identity-section {
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: stretch;
}

.agent-headshot-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  border: 1px dashed #c8d7e8;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
}

.agent-headshot-preview {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, #07304f, #0b4d78);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(17, 28, 45, 0.14);
  overflow: hidden;
  flex: 0 0 auto;
}

.agent-headshot-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-headshot-picker {
  width: min(190px, 100%);
}

.agent-headshot-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.agent-headshot-picker em {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-style: normal;
  font-weight: 900;
  text-transform: none;
}

.agent-page-form label {
  display: grid;
  gap: 7px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-page-form input,
.agent-page-form select,
.agent-page-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--lfn-text);
  outline: 0;
  text-transform: none;
}

.agent-page-form textarea {
  min-height: 94px;
  padding: 12px;
  resize: vertical;
}

.agent-page-form .wide-field {
  grid-column: 1 / -1;
}

.agent-page-form .purple-button {
  justify-self: start;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-actions .form-note {
  margin-left: 6px;
  max-width: 420px;
  min-height: 0;
  border-radius: 8px;
  padding: 10px 12px;
}

.form-actions .form-note.success {
  background: #edf6f1;
}

.form-actions .form-note.warning {
  background: #fff4df;
}

.form-actions .form-note.error {
  background: #ffe7e7;
}

.large-list article {
  min-height: 72px;
}

.agent-roster-shell {
  display: block;
  min-height: 0;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  overflow-x: auto;
}

.profile-hero {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 138px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 22px 24px;
  background: #ffffff;
}

.profile-photo {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, #123a61, #173f67);
  color: #ffffff;
  font-size: 1.52rem;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(17, 28, 45, 0.16);
}

.profile-photo.has-image {
  position: relative;
  overflow: hidden;
  background: transparent;
}

.profile-photo.has-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  transform: scale(1.28);
  z-index: 1;
}

.profile-photo.has-image > span {
  position: relative;
  z-index: 0;
}

.profile-hero h2 {
  margin: 0 0 4px;
  color: var(--lfn-text);
  font-size: clamp(1.9rem, 2.35vw, 2.55rem);
  line-height: 1.08;
}

.profile-hero p {
  margin: 0;
  color: var(--lfn-muted);
  font-size: 1rem;
  font-weight: 800;
}

.profile-hero-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.profile-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--lfn-gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.profile-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-top: 10px;
  border-radius: 999px;
  padding: 0 11px;
  background: #eef7f0;
  color: #1f6f50;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-status-pill.pending {
  background: #edf4ff;
  color: #356ed0;
}

.profile-status-pill.inactive {
  background: #f1f3f6;
  color: #667085;
}

.profile-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-icon-action,
.profile-edit-button {
  flex: 0 0 auto;
  min-height: 38px;
}

.profile-icon-action {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #c9d8e8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--lfn-navy);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(17, 28, 45, 0.06);
}

.profile-icon-action svg,
.profile-primary-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-icon-action:hover {
  border-color: #9fb9d5;
  background: #f7fbff;
}

.profile-primary-action {
  gap: 8px;
  min-width: 136px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.9rem;
  box-shadow: 0 10px 20px rgba(17, 28, 45, 0.16);
}

.profile-section-list {
  display: grid;
  gap: 18px;
}

.agent-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.agent-profile-stat {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 96px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 16px 18px;
  background: #ffffff;
}

.agent-profile-stat span {
  color: var(--lfn-muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-profile-stat strong {
  color: var(--lfn-text);
  font-size: clamp(1.35rem, 1.8vw, 1.82rem);
  line-height: 1;
}

.agent-profile-stat small {
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.profile-detail-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 24px;
  background: #ffffff;
}

.polished-profile-panel {
  box-shadow: 0 16px 40px rgba(17, 28, 45, 0.05);
}

.profile-detail-group {
  display: grid;
  align-content: start;
  gap: 12px;
}

.profile-detail-group + .profile-detail-group {
  border-left: 1px solid #e3ebf3;
  padding-left: 22px;
}

.profile-detail-group h3,
.profile-notes h3 {
  margin: 0;
  color: var(--lfn-text);
  font-size: 0.92rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
}

.profile-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 60px;
  border-bottom: 1px solid #e9eef5;
  padding: 0 0 12px;
}

.profile-field span {
  color: var(--lfn-muted);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.profile-field strong {
  color: var(--lfn-text);
  font-size: 0.95rem;
  line-height: 1.22;
  overflow-wrap: break-word;
  word-break: normal;
}

.profile-notes {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 18px 20px 20px;
  background: #ffffff;
}

.agent-profile-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.agent-profile-lower-grid.single-panel {
  grid-template-columns: 1fr;
}

.agent-profile-transactions .card-header {
  margin-bottom: 4px;
}

.agent-profile-transactions .card-header h3 {
  margin: 0;
}

.agent-profile-transaction-tools {
  margin: 2px 0 10px;
}

.agent-profile-transaction-tools input {
  width: min(360px, 100%);
  min-height: 38px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--lfn-text);
  outline: 0;
}

.agent-profile-transaction-tools input:focus {
  border-color: #9fb9d5;
  box-shadow: 0 0 0 3px rgba(13, 61, 94, 0.08);
}

.agent-profile-transactions-list {
  display: grid;
}

.agent-profile-transactions-list .modern-row {
  grid-template-columns: minmax(0, 1.6fr) minmax(104px, 0.45fr) minmax(150px, 0.56fr) minmax(96px, 0.42fr);
  min-height: 64px;
  gap: 12px;
}

.agent-profile-transactions-list .modern-head {
  min-height: 30px;
}

.agent-profile-transactions-list .agent-transaction-row {
  color: inherit;
  text-decoration: none;
}

.agent-profile-transactions-list .property-cell {
  gap: 12px;
}

.agent-profile-transactions-list .property-thumb {
  width: 56px;
  height: 46px;
}

.agent-profile-transactions-list .agent-transaction-row:hover strong {
  color: var(--lfn-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.agent-profile-transactions-list .property-cell strong,
.agent-profile-transactions-list .property-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-profile-transactions-list .modern-row > span {
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.agent-profile-transactions-list b {
  color: var(--lfn-text);
  font-size: 0.95rem;
  text-align: right;
}

.profile-notes p {
  margin: 0;
  color: var(--lfn-text);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-edit-form {
  display: grid;
  gap: 18px;
}

.profile-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 18px 20px;
  background: #ffffff;
}

.profile-edit-header h2,
.profile-edit-header p,
.profile-edit-section h3 {
  margin: 0;
}

.profile-edit-header h2 {
  color: var(--lfn-text);
  font-size: 1.38rem;
  line-height: 1.1;
}

.profile-edit-header p {
  margin-top: 6px;
  color: var(--lfn-muted);
}

.profile-edit-section {
  display: grid;
  gap: 14px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 20px;
  background: #ffffff;
}

.agent-headshot-upload {
  align-items: start;
}

.agent-headshot-control {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.agent-headshot-control .profile-photo {
  width: 64px;
  height: 64px;
  border-width: 2px;
  font-size: 1rem;
  box-shadow: 0 8px 18px rgba(17, 28, 45, 0.12);
}

.agent-headshot-control input[type="file"] {
  min-height: 42px;
  padding: 8px;
  background: #ffffff;
}

.profile-edit-section h3 {
  color: var(--lfn-text);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 260px;
  border: 1px solid #e2e9f2;
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(135deg, rgba(7, 48, 79, 0.035) 0 1px, transparent 1px 12px);
  text-align: center;
}

.empty-state span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #dce7f2;
  border-radius: 8px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-size: 1.22rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.empty-state strong {
  color: var(--lfn-text);
  font-size: 1rem;
  line-height: 1.2;
}

.empty-state p {
  max-width: 340px;
  color: var(--lfn-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.inline-empty {
  min-height: 170px;
  width: 100%;
}

.table-empty {
  min-height: 190px;
  grid-column: 1 / -1;
  margin-top: 12px;
}

.deadline-alerts .inline-empty {
  grid-column: 1 / -1;
}

.compact-empty {
  min-height: 360px;
}

.compact-empty .purple-button {
  margin-top: 8px;
}

.landing-grid {
  align-items: start;
}

.landing-builder-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.landing-builder-form label {
  display: grid;
  gap: 7px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-builder-form input,
.landing-builder-form select,
.landing-builder-form textarea,
.valuation-form input,
.valuation-form select,
.valuation-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--lfn-text);
  outline: 0;
}

.landing-builder-form textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.valuation-form textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.landing-builder-form .wide-field {
  grid-column: 1 / -1;
}

.field-checklist {
  display: grid;
  gap: 10px;
}

.field-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
  color: var(--lfn-text);
  font-weight: 800;
}

.field-checklist input {
  width: 16px;
  height: 16px;
  accent-color: var(--lfn-navy);
}

.field-checklist label:hover {
  border-color: #c9d7e7;
  background: #f8fbfd;
}

.mini-landing-preview {
  display: grid;
  gap: 12px;
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(rgba(17, 28, 45, 0.78), rgba(17, 28, 45, 0.72)),
    url("https://images.unsplash.com/photo-1568605114967-8130f3a36994?auto=format&fit=crop&w=900&q=80")
      center / cover;
  color: #ffffff;
}

.mini-landing-preview strong {
  font-size: 1.5rem;
}

.mini-landing-preview div {
  min-height: 44px;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--lfn-muted);
}

.mini-landing-preview button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--lfn-gold);
  color: var(--lfn-navy);
  font-weight: 900;
}

.seller-page {
  --seller-primary: #10273f;
  --seller-accent: #1f5b84;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f6fafc;
  color: #10273f;
}

.seller-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 16px clamp(20px, 5vw, 70px);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(38, 52, 82, 0.08);
}

.seller-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--seller-primary);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.seller-logo img {
  display: block;
  width: clamp(150px, 20vw, 210px);
  height: auto;
}

.seller-logo span {
  color: var(--seller-accent);
  font-size: 1.8rem;
}

.seller-header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: flex-end;
}

.seller-header-links a,
.seller-header a:last-child {
  color: var(--seller-primary);
  font-weight: 900;
  text-decoration: none;
}

.seller-header-links a:hover,
.seller-header-links a:focus {
  color: #071b2f;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(198, 162, 71, 0.18), transparent 24rem),
    linear-gradient(135deg, #f6f8fc, #eef2f8);
}

.auth-card {
  display: grid;
  gap: 24px;
  width: min(100%, 480px);
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: clamp(24px, 5vw, 38px);
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(38, 52, 82, 0.16);
}

.auth-logo {
  justify-content: center;
}

.auth-company-logo {
  display: flex;
  width: clamp(160px, 52vw, 220px);
  justify-self: center;
  align-items: center;
  justify-content: center;
  margin: 0 auto -2px;
  text-decoration: none;
}

.auth-company-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.auth-heading {
  display: grid;
  gap: 8px;
  text-align: center;
}

.auth-heading h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.auth-heading h2 {
  margin: 0;
  color: var(--lfn-text, var(--ink));
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.04;
}

.auth-heading p:last-child {
  color: var(--lfn-muted);
}

.password-form {
  display: grid;
  gap: 14px;
}

.password-form label {
  display: grid;
  gap: 7px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.password-form input {
  min-height: 48px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
}

.seller-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 500px);
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  min-height: min(820px, calc(100vh - 76px));
  padding: clamp(36px, 7vw, 90px) clamp(20px, 5vw, 70px);
  background:
    linear-gradient(90deg, rgba(16, 39, 63, 0.92), rgba(16, 39, 63, 0.68) 48%, rgba(16, 39, 63, 0.28)),
    url("hero-florida-home-2.png?v=central-fl-homes-20260526")
      center / cover;
  color: #ffffff;
}

.seller-copy {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.seller-page .eyebrow {
  color: #557089;
  letter-spacing: 0.12em;
}

.seller-hero .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

.seller-agent-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: min(100%, 420px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.seller-agent-card > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--seller-primary);
  font-weight: 900;
}

.seller-agent-card strong,
.seller-agent-card small {
  display: block;
}

.seller-agent-card small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.78);
}

.seller-copy h1 {
  max-width: 760px;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
}

.seller-copy > p:not(.eyebrow) {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.15rem;
  line-height: 1.6;
}

.valuation-form {
  display: grid;
  gap: 16px;
  min-width: 0;
  border: 1px solid rgba(16, 39, 63, 0.12);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  background: #ffffff;
  color: #10273f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.valuation-form-kicker {
  color: #557089;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.valuation-form h2 {
  margin: 0;
  color: var(--seller-primary);
  font-size: clamp(1.65rem, 2vw, 2rem);
  line-height: 1.08;
}

.valuation-form-intro {
  margin: -6px 0 2px;
  color: #526173;
  line-height: 1.5;
}

.valuation-form label {
  display: grid;
  gap: 8px;
  color: #10273f;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.valuation-form input,
.valuation-form select,
.valuation-form textarea {
  min-height: 48px;
  border-color: #cbd8e6;
  background: #f8fbfd;
  color: #10273f;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.valuation-form textarea {
  line-height: 1.45;
}

.valuation-form input:focus,
.valuation-form select:focus,
.valuation-form textarea:focus {
  border-color: #10273f;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 39, 63, 0.12);
}

.valuation-form small {
  color: var(--lfn-muted);
  text-align: center;
}

.seller-page .purple-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--seller-primary);
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
}

.seller-page .purple-button:hover,
.seller-page .purple-button:focus {
  background: #071b2f;
  color: #ffffff;
}

.seller-page .outline-purple {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--seller-primary);
  border-radius: 8px;
  padding: 0 20px;
  background: #ffffff;
  border-color: var(--seller-primary);
  color: var(--seller-primary);
  font-weight: 900;
}

.seller-page .outline-purple:hover,
.seller-page .outline-purple:focus {
  background: var(--seller-primary);
  color: #ffffff;
}

.valuation-message.success {
  color: #1f7a45;
}

.valuation-message.error {
  color: #b42318;
}

.two-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.report-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 60px);
  padding: clamp(44px, 7vw, 86px) clamp(20px, 5vw, 70px);
  background: #ffffff;
}

.report-preview h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
}

.report-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.report-cards article {
  display: grid;
  gap: 10px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 20px;
}

.report-cards span {
  color: var(--lfn-muted);
  line-height: 1.45;
}

.seller-footer {
  display: grid;
  gap: 12px;
  border-top: 1px solid #dbe5ef;
  padding: 26px clamp(20px, 5vw, 70px);
  background: #ffffff;
  color: var(--lfn-muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.45;
}

.seller-footer div,
.seller-footer nav {
  display: flex;
  align-items: center;
  gap: 10px 16px;
  flex-wrap: wrap;
}

.seller-footer strong {
  color: var(--lfn-text);
}

.seller-footer a {
  color: var(--seller-primary);
  font-weight: 900;
}

.seller-footer p {
  max-width: 980px;
  margin: 0;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.seller-valuation-page .lead-message-widget {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 80;
  color: #10273f;
  font-family: Arial, sans-serif;
}

.seller-valuation-page .lead-message-toggle,
.seller-valuation-page .lead-message-close,
.seller-valuation-page .lead-message-submit {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.seller-valuation-page .lead-message-toggle {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 999px;
  background: #10273f;
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(16, 39, 63, 0.26);
}

.seller-valuation-page .lead-message-toggle:hover,
.seller-valuation-page .lead-message-toggle:focus-visible {
  background: #071b2f;
  outline: 0;
  transform: translateY(-2px);
}

.seller-valuation-page .lead-message-toggle svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.85;
}

.seller-valuation-page .lead-message-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 16px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(430px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 256px));
  overflow: hidden;
  border: 1px solid rgba(16, 39, 63, 0.14);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(7, 27, 47, 0.24);
}

.seller-valuation-page .lead-message-panel[hidden] {
  display: none;
}

.seller-valuation-page .lead-message-header {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #10273f;
  color: #ffffff;
}

.seller-valuation-page .lead-message-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.seller-valuation-page .lead-message-identity img {
  display: block;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: #ffffff;
  object-fit: cover;
  object-position: center top;
}

.seller-valuation-page .lead-message-identity strong,
.seller-valuation-page .lead-message-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-valuation-page .lead-message-identity strong {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.seller-valuation-page .lead-message-identity span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
}

.seller-valuation-page .lead-message-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.35rem;
  line-height: 1;
}

.seller-valuation-page .lead-message-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

.seller-valuation-page .lead-message-bubble {
  margin: 0;
  border-radius: 12px;
  padding: 13px 15px;
  background: #f3f6fa;
  color: #10273f;
  font-size: 0.92rem;
  line-height: 1.42;
}

.seller-valuation-page .lead-message-form {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d9e4ee;
  border-radius: 12px;
  padding: 16px;
  background: #ffffff;
}

.seller-valuation-page .lead-message-form label {
  display: grid;
  gap: 5px;
}

.seller-valuation-page .lead-message-form label span {
  color: #5b6d80;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.seller-valuation-page .lead-message-form input,
.seller-valuation-page .lead-message-form textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd7e3;
  border-radius: 6px;
  padding: 12px 14px;
  background: #ffffff;
  color: #10273f;
  font: inherit;
  font-size: 0.95rem;
}

.seller-valuation-page .lead-message-form textarea {
  min-height: 104px;
  resize: vertical;
}

.seller-valuation-page .lead-message-form input:focus,
.seller-valuation-page .lead-message-form textarea:focus {
  border-color: #10273f;
  box-shadow: 0 0 0 3px rgba(16, 39, 63, 0.12);
  outline: 0;
}

.seller-valuation-page .lead-message-consent {
  margin: 0;
  color: #526173;
  font-size: 0.68rem;
  line-height: 1.32;
}

.seller-valuation-page .lead-message-consent a {
  color: #10273f;
  font-weight: 900;
}

.seller-valuation-page .lead-message-status {
  min-height: 1.2em;
  margin: 0;
  color: #526173;
  font-size: 0.82rem;
  font-weight: 800;
}

.seller-valuation-page .lead-message-status.success {
  color: #1f6f50;
}

.seller-valuation-page .lead-message-status.error {
  color: #9c1c1c;
}

.seller-valuation-page .lead-message-submit {
  display: inline-flex;
  position: sticky;
  bottom: 0;
  z-index: 1;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 6px;
  background: #10273f;
  box-shadow: 0 -10px 18px rgba(255, 255, 255, 0.92);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
}

.seller-valuation-page .lead-message-submit svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.seller-valuation-page .lead-message-submit:hover,
.seller-valuation-page .lead-message-submit:focus-visible {
  background: #071b2f;
  outline: 0;
}

@media (max-width: 720px) {
  .seller-valuation-page .lead-message-toggle {
    width: 56px;
    height: 56px;
  }

  .seller-valuation-page .lead-message-panel {
    position: fixed;
    right: 12px;
    bottom: 78px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 96px);
    border-radius: 14px;
  }
}

.marketing-command {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.marketing-command article {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 96px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 15px 16px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(30, 44, 69, 0.06);
}

.marketing-command span,
.campaign-snapshot span,
.campaign-queue small {
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.marketing-command strong {
  color: var(--lfn-text);
  font-size: clamp(1.35rem, 1.8vw, 1.85rem);
  line-height: 1;
}

.marketing-command small {
  color: var(--lfn-muted);
  font-weight: 800;
}

.marketing-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.marketing-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr);
  gap: 16px;
  align-items: stretch;
  min-height: 190px;
  background: #ffffff;
  color: var(--lfn-text);
}

.marketing-hero-copy {
  display: grid;
  align-content: center;
  gap: 10px;
  max-width: 660px;
}

.marketing-hero-copy h2 {
  color: var(--lfn-text);
  font-size: clamp(1.55rem, 2.4vw, 2.25rem);
  line-height: 1.04;
}

.marketing-hero-copy p {
  max-width: 620px;
  color: var(--lfn-muted);
  font-size: 0.96rem;
  line-height: 1.45;
}

.marketing-kit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.marketing-kit-actions .outline-purple {
  color: var(--lfn-navy);
}

.campaign-snapshot {
  display: grid;
  gap: 8px;
  align-content: center;
}

.campaign-snapshot article {
  display: grid;
  gap: 4px;
  border: 1px solid #e3ebf3;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fbfd;
}

.campaign-snapshot span {
  color: var(--lfn-muted);
}

.campaign-snapshot strong {
  color: var(--lfn-text);
  font-size: 1rem;
}

.campaign-queue-card,
.ai-marketing-card,
.ai-output-card {
  align-self: start;
}

.ready-campaigns {
  margin-bottom: 16px;
}

.ready-campaign-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ready-campaign-grid > .empty-state {
  grid-column: 1 / -1;
}

.ready-campaign-card {
  display: grid;
  align-content: space-between;
  gap: 12px;
  min-height: 210px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.ready-campaign-card:hover {
  border-color: #c9d7e7;
  box-shadow: 0 18px 36px rgba(38, 52, 82, 0.1);
  transform: none;
}

.ready-campaign-card span {
  justify-self: start;
  border-radius: 8px;
  padding: 6px 9px;
  background: #fff5db;
  color: #9b721f;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ready-campaign-card strong {
  color: var(--lfn-navy);
  font-size: 1.18rem;
  line-height: 1.12;
}

.ready-campaign-card p {
  color: var(--lfn-muted);
  line-height: 1.42;
}

.ready-campaign-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}

.ready-campaign-card em {
  color: var(--lfn-muted);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 900;
}

.ready-campaign-card button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--lfn-navy);
  color: #ffffff;
  font-weight: 900;
}

.campaign-queue,
.generated-drafts {
  display: grid;
  gap: 12px;
}

.campaign-queue .inline-empty,
.generated-drafts .inline-empty,
.ready-campaign-grid > .inline-empty,
.automation-list .inline-empty {
  min-height: 150px;
  border-color: #e3ebf3;
  background: #fbfcff;
}

.campaign-queue article {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.campaign-queue strong,
.campaign-queue small {
  display: block;
}

.campaign-queue small {
  margin-top: 4px;
  text-transform: none;
}

.queue-status {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.queue-status.live {
  background: #e7f7eb;
  color: #26864d;
}

.queue-status.review {
  background: #fff5db;
  color: #a77416;
}

.queue-status.draft {
  background: #edf4ff;
  color: #356ed0;
}

.marketing-grid {
  align-items: start;
  gap: 16px;
}

.ai-marketing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.marketing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ai-marketing-form label,
.marketing-form label {
  display: grid;
  gap: 7px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-marketing-form input,
.ai-marketing-form select,
.ai-marketing-form textarea,
.marketing-form input,
.marketing-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--lfn-text);
}

.ai-marketing-form textarea {
  min-height: 96px;
  padding: 12px;
  line-height: 1.45;
  resize: vertical;
}

.ai-marketing-form .wide-field,
.marketing-form .wide-field {
  grid-column: 1 / -1;
}

.ai-marketing-form .purple-button {
  justify-self: start;
}

.field-checklist {
  display: grid;
  gap: 10px;
}

.field-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid #e3ebf3;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcff;
  color: var(--lfn-text);
  font-weight: 800;
}

.field-checklist input {
  width: 16px;
  height: 16px;
  accent-color: var(--lfn-navy);
}

.field-checklist label:hover {
  border-color: #c9d7e7;
  background: #f8fbfd;
}

.generated-drafts article {
  display: grid;
  gap: 10px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.generated-drafts p {
  color: var(--lfn-muted);
  line-height: 1.45;
}

.generated-drafts div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.generated-drafts button {
  min-height: 34px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-weight: 900;
}

.marketing-preview-card {
  grid-row: span 2;
}

.social-graphic-preview {
  position: relative;
  display: grid;
  align-content: end;
  aspect-ratio: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--lfn-navy);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.graphic-photo {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17, 28, 45, 0.12), rgba(17, 28, 45, 0.82)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.09) 0 1px, transparent 1px 18px),
    linear-gradient(135deg, #213752, #122137);
}

.graphic-ribbon {
  position: absolute;
  top: 18px;
  left: 18px;
  border-radius: 8px;
  padding: 9px 12px;
  background: var(--lfn-gold);
  color: var(--lfn-navy);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.graphic-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  max-width: 82%;
  margin: 0 18px 12px;
  color: #ffffff;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.35);
}

.graphic-copy span {
  color: var(--lfn-gold-2);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graphic-copy strong {
  color: #ffffff;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 0.96;
}

.graphic-copy small {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  font-weight: 900;
}

.graphic-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
  margin: 16px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.94);
}

.graphic-agent,
.graphic-logo {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
}

.graphic-agent {
  width: 48px;
  height: 48px;
  background: #e9edf5;
  color: var(--lfn-navy);
}

.graphic-logo {
  width: 46px;
  height: 46px;
  background: var(--lfn-navy);
  color: var(--lfn-gold);
}

.graphic-footer small {
  color: var(--lfn-muted);
}

.messages-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.messages-page .lfn-topbar {
  border-bottom: 1px solid var(--lfn-line);
  padding-bottom: 22px;
}

.messages-page .lfn-topbar h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.simple-messages-layout {
  grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.72fr);
  max-width: 1280px;
}

.inbox-list-card,
.conversation-card {
  align-self: start;
}

.inbox-list-card,
.simple-compose-card {
  padding: 20px;
}

.message-count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-size: 0.78rem;
  font-weight: 900;
}

.message-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.message-filter-row button {
  min-height: 36px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #ffffff;
  color: var(--lfn-muted);
  font-weight: 900;
}

.message-filter-row button.active,
.message-filter-row button:hover {
  border-color: var(--lfn-navy);
  background: #edf5fb;
  color: var(--lfn-navy);
}

.inbox-list {
  display: grid;
  gap: 8px;
}

.message-empty-state {
  min-height: 180px;
  padding: 22px;
}

.message-empty-state span {
  width: 44px;
  height: 44px;
}

.message-empty-state p {
  max-width: 230px;
}

.inbox-list button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--lfn-text);
  text-align: left;
  cursor: pointer;
}

.inbox-list button.active,
.inbox-list button:hover {
  border-color: #b9cce0;
  background: #f8fbfd;
}

.inbox-list strong,
.inbox-list small {
  display: block;
}

.message-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #07304f, #0b4d78);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
}

.message-avatar.system {
  background: #fff1dd;
  color: #ad7518;
}

.inbox-list small,
.inbox-list time {
  color: var(--lfn-muted);
}

.conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--lfn-line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.conversation-header p {
  margin-top: 5px;
  color: var(--lfn-muted);
}

.message-context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.message-context-strip article {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfd;
}

.message-context-strip span {
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.message-context-strip strong {
  color: var(--lfn-text);
  line-height: 1.2;
}

.conversation-thread {
  display: grid;
  gap: 12px;
  min-height: 330px;
  align-content: start;
  border: 1px solid #e7edf4;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.message-bubble {
  display: grid;
  gap: 6px;
  max-width: 72%;
  border-radius: 8px;
  padding: 13px;
}

.message-bubble strong {
  font-size: 0.86rem;
}

.message-bubble p {
  color: inherit;
  line-height: 1.45;
}

.message-bubble time {
  color: var(--lfn-muted);
  font-size: 0.78rem;
}

.message-bubble.incoming {
  justify-self: start;
  background: #f7f8fc;
}

.message-bubble.outgoing {
  justify-self: end;
  background: var(--lfn-navy);
  color: #ffffff;
}

.message-bubble.outgoing time {
  color: rgba(255, 255, 255, 0.68);
}

.reply-box {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--lfn-line);
  padding-top: 16px;
  margin-top: 16px;
}

.reply-box textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
}

.simple-message-form label {
  display: grid;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.simple-message-form input,
.simple-message-form select,
.simple-message-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--lfn-text);
  font-size: 0.95rem;
  font-weight: 800;
  outline: 0;
  text-transform: none;
}

.simple-message-form select {
  background: #ffffff;
}

.simple-message-form textarea {
  min-height: 180px;
  padding: 12px;
  line-height: 1.45;
}

.simple-conversation-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.simple-conversation-header h2 {
  font-size: clamp(1.35rem, 1.8vw, 1.7rem);
  line-height: 1.1;
}

.message-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.message-header-actions button {
  min-height: 38px;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.message-header-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.message-danger-action {
  border-color: #edc4c4;
  color: #a73c3c;
}

.message-danger-action:hover:not(:disabled) {
  border-color: #a73c3c;
  background: #fff5f5;
  color: #8e2c2c;
}

.simple-compose-card .reply-box {
  border-top: 0;
  margin-top: 14px;
  padding-top: 0;
}

.simple-compose-card .reply-box > div {
  border-top: 1px solid var(--lfn-line);
  padding-top: 12px;
}

.compact-message-thread {
  min-height: 240px;
}

.message-preview-text {
  overflow: hidden;
  color: var(--lfn-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.message-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2f6fdd;
}

.simple-message-form .form-note {
  align-self: center;
  margin: 0;
  color: var(--lfn-muted);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.simple-message-form .form-note.error {
  color: #b0443c;
}

.simple-message-form .form-note.success {
  color: #2a7c58;
}

.icon-action-button {
  display: grid;
  place-items: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
}

.icon-action-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reply-box div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reply-box label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lfn-muted);
  font-weight: 800;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.calendar-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.calendar-toolbar h2,
.calendar-toolbar p {
  margin: 0;
}

.calendar-toolbar p {
  margin-top: 6px;
  color: var(--lfn-muted);
  font-weight: 700;
}

.calendar-filter-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
  min-width: min(460px, 100%);
}

.calendar-filter-controls label,
.calendar-filter-controls span {
  display: grid;
  gap: 7px;
}

.calendar-filter-controls span,
.muted-label {
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-filter-controls select {
  min-height: 44px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--lfn-text);
  font: inherit;
  font-weight: 800;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-grid > span {
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.calendar-grid button {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 92px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--lfn-text);
  font-weight: 900;
  text-align: left;
}

.calendar-grid .calendar-empty-day {
  opacity: 0;
  pointer-events: none;
}

.calendar-grid small {
  border-radius: 999px;
  padding: 5px 7px;
  background: #edf6f1;
  color: #23814b;
  font-size: 0.68rem;
}

.calendar-grid .urgent-day small {
  background: #ffe7e7;
  color: #c43131;
}

.calendar-grid .has-event,
.calendar-grid .urgent-day {
  border-color: #d4bd70;
  background: #fffaf0;
}

.reminder-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reminder-form label {
  display: grid;
  gap: 7px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reminder-form input,
.reminder-form select,
.reminder-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--lfn-text);
}

.reminder-form textarea {
  min-height: 90px;
  padding: 12px;
  resize: vertical;
}

.reminder-form .wide-field {
  grid-column: 1 / -1;
}

.settings-page-grid {
  align-items: start;
}

.settings-page-grid .add-agent-card {
  grid-column: 1 / -1;
}

.commissions-page-grid {
  align-items: start;
}

.commission-summary-cards {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.commission-summary-cards .dashboard-metric-card {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  min-height: 112px;
  padding: 18px 54px 18px 18px;
}

.commission-summary-cards .dashboard-metric-card::before {
  left: 90px;
  top: 26px;
  bottom: 26px;
}

.commission-summary-cards .dashboard-metric-card .summary-icon {
  width: 54px;
  height: 54px;
}

.commission-summary-cards .dashboard-metric-card strong {
  overflow: visible;
  font-size: clamp(1.55rem, 1.55vw, 1.95rem);
  letter-spacing: 0;
  text-overflow: clip;
}

.commission-summary-cards .dashboard-metric-card span:not(.summary-icon) {
  font-size: 0.84rem;
  line-height: 1.05;
}

.commission-summary-cards .dashboard-metric-card a {
  color: var(--metric-color);
  font-size: 0.78rem;
}

.commission-summary-cards .dashboard-metric-card a::after {
  right: 16px;
  width: 31px;
  height: 31px;
}

.financials-card {
  grid-column: 1 / -1;
}

.wide-payout-card {
  grid-column: 1 / -1;
}

.check-receipt-card .card-header {
  align-items: center;
}

.check-receipt-card .muted-label {
  border-color: #d6e4ef;
  background: #f7fbff;
  color: #52627a;
}

.financial-table {
  display: grid;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  overflow: hidden;
}

.financial-row {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.4fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr)
    minmax(130px, 0.9fr) minmax(120px, 0.8fr) minmax(110px, 0.8fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 0 14px;
  border-bottom: 1px solid var(--lfn-line);
  background: #ffffff;
}

.transaction-financial-table .financial-row {
  grid-template-columns:
    minmax(220px, 1.5fr) minmax(120px, 0.8fr) minmax(100px, 0.7fr)
    minmax(90px, 0.6fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr);
}

.financial-row:last-child {
  border-bottom: 0;
}

.financial-head {
  min-height: 42px;
  background: #f7f8fc;
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.financial-total-row {
  min-height: 64px;
  border-top: 1px solid #cddae8;
  background:
    linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
  color: var(--lfn-navy);
  font-weight: 950;
}

.financial-total-row span {
  color: var(--lfn-navy);
}

.financial-total-row strong {
  color: var(--lfn-navy);
}

.financial-row strong,
.financial-row small {
  display: block;
}

.financial-row small {
  margin-top: 4px;
  color: var(--lfn-muted);
}

.financial-row em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: #fff5db;
  color: #ad7518;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 900;
}

.commission-click-row {
  color: inherit;
  text-decoration: none;
}

.commission-click-row:hover {
  background: #fafcff;
}

.financial-row em.paid {
  background: #e7f7eb;
  color: #26864d;
}

.financial-row em.pending {
  background: #fff5db;
  color: #a77416;
}

.financial-row em.projected {
  background: #edf4ff;
  color: #356ed0;
}

@media (min-width: 1180px) {
  .transactions-card,
  .dates-card {
    grid-column: span 1;
  }

  .transaction-work-grid .transaction-deadlines-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1180px) {
  .summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-profile-lower-grid,
  .profile-detail-panel {
    grid-template-columns: 1fr;
  }

  .profile-detail-group + .profile-detail-group {
    border-left: 0;
    border-top: 1px solid #e3ebf3;
    padding-left: 0;
    padding-top: 22px;
  }

  .deadline-alerts,
  .entry-fields {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .alert-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .alert-card-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .deadline-mini-list article,
  .transaction-deadlines-card .deadline-mini-list article {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .deadline-mini-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .marketing-command {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ready-campaign-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .marketing-stage,
  .marketing-hero-card {
    grid-template-columns: 1fr;
  }

  .marketing-preview-card {
    grid-row: auto;
  }

  .agent-roster-head,
  .agent-roster-row {
    grid-template-columns: minmax(230px, 1.25fr) minmax(170px, 1fr) minmax(112px, 0.5fr) minmax(86px, 0.42fr) minmax(78px, 0.34fr);
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .lfn-dashboard {
    grid-template-columns: 1fr;
  }

  .lfn-sidebar {
    position: static;
    height: auto;
  }

  .lfn-main {
    padding: 20px;
  }

  .lfn-topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-cards,
  .deadline-alerts,
  .marketing-command,
  .ready-campaign-grid,
  .commission-modern,
  .document-checklist-groups,
  .pipeline-mini,
  .compact-agent-form,
  .transaction-entry-form,
  .entry-fields,
  .transaction-form-grid,
  .agent-form-grid,
  .agent-identity-section,
  .upload-checklist,
  .scan-status,
  .extraction-review-banner,
  .extraction-summary,
  .extraction-review-body,
  .extraction-review-section > div,
  .extraction-review-section article,
  .extraction-grid,
  .transaction-extraction-section > div,
  .transaction-extraction-section article {
    grid-template-columns: 1fr;
  }

  .alert-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .alert-card-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .alert-card-actions .compact-action {
    flex: 1 1 140px;
  }

  .deadline-mini-list article,
  .transaction-deadlines-card .deadline-mini-list article {
    grid-template-columns: 1fr;
  }

  .deadline-mini-actions {
    grid-column: 1;
    justify-content: stretch;
  }

  .deadline-mini-actions .compact-action {
    flex: 1 1 140px;
  }

  .transaction-extraction-section article,
  .transaction-extraction-section article:nth-child(2n) {
    border-right: 0;
  }

  .transaction-extraction-section article:last-child {
    border-bottom: 0;
  }

  .agent-roster-head {
    display: none;
  }

  .agent-roster-row {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 14px;
  }

  .agent-roster-person {
    align-items: center;
  }

  .agent-roster-row > em {
    justify-self: start;
  }

  .summary-card {
    min-height: 108px;
    padding: 16px 18px;
  }

  .summary-icon {
    width: 50px;
    height: 50px;
  }

  .transaction-entry-form > .purple-button {
    grid-column: 1;
    width: 100%;
  }

  .alert-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .alert-card button {
    grid-column: 1 / -1;
  }

  .modern-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }

  .modern-head {
    display: none;
  }

  .property-cell {
    align-items: flex-start;
  }

  .progress-list div,
  .settings-modern label,
  .agent-page-form,
  .review-list article,
  .deal-detail-grid,
  .focus-list article,
  .messages-layout,
  .message-context-strip,
  .calendar-layout,
  .reminder-form,
  .financial-row,
  .transaction-financial-table .financial-row,
  .commission-summary,
  .commission-queue-row,
  .landing-builder-form,
  .ai-marketing-form,
  .marketing-form,
  .seller-hero,
  .report-preview,
  .report-cards,
  .two-fields {
    grid-template-columns: 1fr;
  }

  .seller-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .seller-header-links {
    justify-content: flex-start;
  }

  .financial-head {
    display: none;
  }

  .commission-queue-row em {
    width: 100%;
  }

  .graphic-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .social-graphic-preview {
    min-height: 0;
  }

  .graphic-copy {
    max-width: none;
  }

  .conversation-header,
  .reply-box div {
    align-items: stretch;
    flex-direction: column;
  }

  .message-bubble {
    max-width: 100%;
  }

  .agent-page-form .purple-button {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(219, 226, 220, 0.86);
  background: rgba(246, 243, 237, 0.88);
  backdrop-filter: blur(16px);
}

.site-brand,
.mini-nav,
.hero-actions,
.form-options,
.check,
.portal-topbar,
.panel-heading,
.portal-actions {
  display: flex;
  align-items: center;
}

.site-brand {
  gap: 12px;
  min-width: 0;
}

.site-brand strong,
.site-brand small {
  display: block;
}

.site-brand small {
  color: var(--muted);
}

.site-brand.inverse {
  color: #ffffff;
}

.site-brand.inverse small {
  color: rgba(255, 255, 255, 0.68);
}

.logo-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--green-dark);
  color: #ffffff;
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  color: var(--muted);
  font-weight: 800;
}

.site-nav a:hover {
  color: var(--green);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 13px;
  background: var(--green);
  color: #ffffff !important;
}

.hero {
  display: flex;
  align-items: flex-end;
  min-height: calc(100vh - 76px);
  padding: clamp(28px, 6vw, 72px);
  color: #ffffff;
  background:
    linear-gradient(90deg, rgba(18, 59, 44, 0.88), rgba(18, 59, 44, 0.46) 56%, rgba(18, 59, 44, 0.2)),
    url("https://images.unsplash.com/photo-1570129477492-45c003edd2be?auto=format&fit=crop&w=1800&q=80")
      center / cover;
}

.hero-content {
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.agent-access .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.94;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

h3 {
  margin-bottom: 0;
  font-size: 1.7rem;
  line-height: 1;
}

.hero p,
.section p,
.agent-copy p {
  max-width: 670px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
  line-height: 1.62;
}

.section p,
.agent-copy p {
  color: var(--muted);
}

.hero-actions {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.primary-link,
.secondary-link,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-link,
.primary-button {
  border: 0;
  background: var(--green);
  color: #ffffff;
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #ffffff;
}

.secondary-link.dark {
  border-color: var(--line);
  color: var(--ink);
}

.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  padding: clamp(48px, 7vw, 90px) clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.split-section {
  align-items: center;
  background: #ffffff;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.community-grid span,
.access-notes span,
.metric-card,
.panel,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.community-grid span {
  min-height: 64px;
  padding: 20px;
  color: var(--green-dark);
  font-weight: 900;
}

.agent-access {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.72fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
  padding: clamp(50px, 7vw, 96px) clamp(18px, 4vw, 56px);
  color: #ffffff;
  background: var(--green-dark);
}

.access-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.access-notes span {
  min-height: 36px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: none;
  font-weight: 900;
}

.login-card {
  display: grid;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
  color: var(--ink);
}

.form-heading .eyebrow {
  color: var(--green);
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--ink);
  outline: 0;
}

.field input:focus {
  border-color: rgba(31, 111, 80, 0.58);
  box-shadow: 0 0 0 4px rgba(31, 111, 80, 0.12);
}

.password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 8px;
}

.icon-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  font-weight: 900;
}

.form-options {
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-options a {
  color: var(--green);
  font-weight: 900;
}

.check {
  gap: 8px;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.primary-button {
  width: 100%;
  min-height: 50px;
}

.primary-button.compact {
  width: auto;
  min-height: 42px;
}

.secondary-button.small {
  min-height: 36px;
  padding: 0 12px;
}

.primary-button:hover,
.primary-link:hover,
.nav-cta:hover {
  background: #185c41;
}

.form-note {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-note.error {
  color: #b3422f;
}

.form-note.success {
  color: var(--green);
  font-weight: 800;
}

.form-note.warning {
  color: #a16100;
  font-weight: 800;
}

.contact-section {
  align-items: center;
  background: #ffffff;
}

.portal-page {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.portal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 22px;
  background: var(--green-dark);
}

.sidebar-note {
  display: grid;
  gap: 4px;
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.sidebar-note strong,
.sidebar-note span {
  display: block;
}

.sidebar-note strong {
  color: #ffffff;
}

.portal-nav {
  display: grid;
  gap: 8px;
}

.portal-nav a {
  min-height: 42px;
  border-radius: 8px;
  padding: 11px 12px;
  color: rgba(255, 255, 255, 0.74);
  font-weight: 800;
}

.portal-nav a.active,
.portal-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.portal-workspace {
  min-width: 0;
  padding: 26px;
}

.portal-topbar {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.portal-actions {
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.portal-topbar h1 {
  color: var(--ink);
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.broker-dashboard .portal-topbar h1 {
  max-width: 860px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.metric-card strong {
  font-size: 2.15rem;
  line-height: 1;
}

.metric-card span:last-child,
.task-card span,
.client-list span {
  color: var(--muted);
}

.metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.broker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.75fr);
  gap: 18px;
  margin-bottom: 18px;
}

.crm-command {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(31, 45, 71, 0.07);
}

.crm-search {
  display: grid;
  gap: 6px;
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-search input {
  min-height: 46px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--lfn-text);
  outline: 0;
}

.crm-command .top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.agent-crm-hero {
  display: none;
}

.agent-crm-view .agent-crm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  border: 1px solid rgba(7, 48, 79, 0.14);
  border-radius: 14px;
  padding: clamp(18px, 3vw, 28px);
  background:
    radial-gradient(circle at top right, rgba(47, 116, 165, 0.2), transparent 34%),
    linear-gradient(135deg, #f7fbf8 0%, #edf6fb 48%, #fffaf0 100%);
  box-shadow: 0 18px 44px rgba(7, 48, 79, 0.09);
}

.agent-crm-hero .eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  border: 1px solid rgba(7, 48, 79, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--lfn-navy);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-crm-hero h2 {
  max-width: 680px;
  margin: 0;
  color: var(--lfn-text);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1.04;
}

.agent-crm-hero p {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--lfn-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.agent-crm-actions {
  display: grid;
  gap: 10px;
}

.agent-crm-actions button,
.agent-crm-actions a {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(7, 48, 79, 0.13);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--lfn-text);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(7, 48, 79, 0.07);
  cursor: pointer;
}

.agent-crm-actions strong {
  color: var(--lfn-navy);
  font-size: 0.98rem;
}

.agent-crm-actions span {
  color: var(--lfn-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.crm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.36fr);
  gap: 18px;
  margin-bottom: 18px;
}

.crm-stage-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.crm-stage-strip button {
  display: grid;
  place-items: center;
  min-height: 38px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--lfn-muted);
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.crm-stage-strip button.active {
  border-color: rgba(7, 48, 79, 0.22);
  background: #edf5fb;
  color: var(--lfn-navy);
}

.crm-empty-panel {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-height: 330px;
  border: 1px solid #e2e9f2;
  border-radius: 8px;
  padding: clamp(26px, 5vw, 46px);
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96)),
    repeating-linear-gradient(135deg, rgba(7, 48, 79, 0.035) 0 1px, transparent 1px 12px);
  text-align: center;
}

.crm-empty-panel > span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-size: 1.35rem;
  font-weight: 900;
}

.crm-empty-panel strong {
  color: var(--lfn-text);
  font-size: 1.28rem;
}

.crm-empty-panel p {
  max-width: 560px;
  margin: 0;
  color: var(--lfn-muted);
  line-height: 1.5;
}

.crm-empty-panel div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.crm-empty-panel .outline-purple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  margin-top: 0;
}

.crm-lead-list {
  min-height: 330px;
}

.crm-lead-list .lead-row {
  grid-template-columns: minmax(160px, 1.15fr) minmax(180px, 1.35fr) minmax(120px, 0.85fr) minmax(100px, 0.7fr);
}

.lead-row-button {
  width: 100%;
  border-width: 0 0 1px;
  border-radius: 0;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.lead-row-button:hover {
  background: #f8fbfd;
}

.lead-row-button:focus-visible {
  outline: 3px solid rgba(15, 87, 132, 0.18);
  outline-offset: -3px;
}

.lead-row-head {
  min-height: 42px;
  background: #f8fbfd;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.lead-row div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lead-row strong,
.lead-row span,
.lead-row em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lead-row span,
.lead-row em {
  color: var(--lfn-muted);
  font-size: 0.88rem;
  font-style: normal;
}

.lead-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.lead-row-actions a {
  border: 1px solid rgba(7, 48, 79, 0.14);
  border-radius: 999px;
  padding: 3px 8px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 0.72rem;
  font-weight: 900;
  text-decoration: none;
}

.agent-crm-view .crm-command {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.agent-crm-view .crm-command .top-link {
  display: none;
}

.agent-crm-view .crm-stage-strip button.active {
  border-color: rgba(27, 95, 62, 0.28);
  background: #edf6f1;
  color: #185c41;
}

.agent-crm-view .crm-task button:hover,
.lead-row-actions a:hover,
.agent-crm-actions button:hover,
.agent-crm-actions a:hover {
  transform: translateY(-1px);
}

.crm-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 48, 79, 0.44);
}

.crm-modal[hidden] {
  display: none;
}

.crm-modal-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(7, 48, 79, 0.24);
}

.crm-modal-panel .card-header {
  align-items: start;
  margin-bottom: 16px;
}

.crm-modal-panel .card-header p {
  margin: 4px 0 0;
  color: var(--lfn-muted);
}

.crm-detail-panel {
  width: min(1080px, 100%);
}

.crm-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.48fr);
  gap: 16px;
  align-items: start;
}

.crm-detail-main,
.crm-detail-side {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.crm-lead-profile-card,
.crm-quick-log-card,
.crm-template-card,
.crm-detail-task-card,
.crm-timeline-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.crm-profile-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.crm-profile-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0b3151, #0d5b87);
  color: #ffffff;
  font-weight: 950;
}

.crm-profile-head div,
.crm-profile-next,
.crm-detail-task div,
.crm-activity-timeline div {
  min-width: 0;
}

.crm-profile-head div > strong,
.crm-profile-head div > span,
.crm-profile-next strong,
.crm-profile-next span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-profile-head div > strong {
  color: var(--lfn-text);
  font-size: 1.02rem;
  line-height: 1.15;
  white-space: nowrap;
}

.crm-profile-head div > span,
.crm-profile-next span {
  color: var(--lfn-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.crm-profile-head .lead-score {
  justify-self: end;
}

.crm-profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
}

.crm-profile-stats span {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.crm-profile-stats strong,
.crm-profile-stats small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-profile-stats strong {
  color: var(--lfn-text);
  font-size: 0.9rem;
}

.crm-profile-stats small {
  color: var(--lfn-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crm-profile-next {
  border-left: 3px solid #c8a84f;
  padding-left: 10px;
}

.crm-profile-message {
  display: grid;
  gap: 5px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #f7fbff;
}

.crm-profile-message strong {
  color: var(--lfn-navy);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-profile-message span {
  color: var(--lfn-text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.crm-profile-next strong {
  color: var(--lfn-navy);
  font-size: 0.96rem;
  line-height: 1.25;
}

.crm-profile-actions,
.crm-quick-log-actions,
.crm-template-actions,
.crm-task-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crm-profile-actions a,
.crm-quick-log-actions button,
.crm-template-actions button,
.crm-task-presets button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #d4dfeb;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.crm-profile-actions a:hover,
.crm-quick-log-actions button:hover,
.crm-template-actions button:hover,
.crm-task-presets button:hover {
  border-color: #b9cce0;
  background: #eef7ff;
}

.crm-template-actions button {
  flex: 1 1 126px;
}

.crm-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.crm-detail-section-head h3 {
  color: var(--lfn-text);
  font-size: 0.9rem;
  line-height: 1.1;
}

.crm-detail-section-head span {
  color: var(--lfn-muted);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-log-note {
  display: grid;
  gap: 6px;
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-log-note textarea {
  width: 100%;
  min-height: 86px;
  resize: vertical;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--lfn-text);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.crm-detail-task-list,
.crm-activity-timeline {
  display: grid;
  gap: 10px;
}

.crm-detail-task,
.crm-activity-timeline article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.crm-detail-task {
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.crm-detail-task button,
.crm-activity-timeline article > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f2f7fb;
  color: var(--lfn-navy);
  font-weight: 950;
}

.crm-detail-task button {
  cursor: pointer;
}

.crm-detail-task strong,
.crm-detail-task span,
.crm-activity-timeline strong,
.crm-activity-timeline p,
.crm-activity-timeline time {
  display: block;
}

.crm-detail-task strong,
.crm-activity-timeline strong {
  color: var(--lfn-text);
  font-size: 0.9rem;
  line-height: 1.25;
}

.crm-detail-task span,
.crm-activity-timeline p,
.crm-activity-timeline time,
.crm-detail-empty span {
  color: var(--lfn-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.crm-activity-timeline article {
  position: relative;
}

.crm-activity-timeline article + article {
  border-top: 1px solid #edf1f6;
  padding-top: 10px;
}

.crm-detail-empty {
  display: grid;
  gap: 4px;
  border: 1px dashed #d6e1ec;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.crm-detail-empty strong {
  color: var(--lfn-text);
  font-size: 0.9rem;
}

.crm-lead-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-detail-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-detail-form .form-actions .purple-button,
.crm-lead-form .form-actions .purple-button,
.crm-detail-form .form-actions .outline-purple,
.crm-lead-form .form-actions .outline-purple,
.crm-detail-form .form-actions .danger-action {
  width: auto;
  margin-top: 0;
  padding-right: 18px;
  padding-left: 18px;
}

.crm-delete-action {
  margin-left: auto;
}

.crm-detail-form {
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.crm-task-list {
  display: grid;
  gap: 10px;
}

.crm-task {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.crm-task button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--lfn-navy);
  font-weight: 900;
  cursor: pointer;
}

.crm-task div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crm-task strong,
.crm-task span {
  overflow-wrap: anywhere;
}

.crm-task span {
  color: var(--lfn-muted);
  font-size: 0.86rem;
}

.deal-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(28, 43, 37, 0.08);
}

.deal-card span,
.deal-card small {
  color: var(--muted);
}

.crm-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.pipeline-heading,
.contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-checklist,
.automation-list,
.activity-timeline {
  display: grid;
  gap: 10px;
}

.task-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
  font-weight: 800;
}

.task-checklist input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.automation-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--lfn-text);
  text-align: left;
}

.automation-list button:hover {
  border-color: #d4bd70;
  background: #fffaf0;
}

.automation-list button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.automation-list span {
  color: var(--lfn-muted);
}

.playbook-status {
  margin-top: 12px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.contact-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #ffffff;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.contact-head {
  justify-content: flex-start;
}

.contact-head strong,
.contact-head small {
  display: block;
}

.contact-head small {
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  border-radius: 999px;
  padding: 6px 9px;
  background: #edf6f1;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
}

.activity-timeline article {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.activity-timeline article:last-child {
  border-bottom: 0;
}

.activity-timeline time {
  color: var(--green);
  font-weight: 900;
}

.panel {
  padding: 18px;
}

.panel-heading {
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel h2 {
  font-size: 1.35rem;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--green);
  font-weight: 900;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1.2fr) minmax(150px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
}

.agent-roster,
.settings-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.settings-list {
  margin-top: 0;
}

.agent-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #e4f1ea;
  color: var(--green);
  font-weight: 900;
}

.agent-row strong,
.agent-row span,
.agent-row em {
  display: block;
}

.agent-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.agent-row em,
.document-list em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #edf6f1;
  color: var(--green);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 900;
}

.agent-row em.warning,
.document-list article:first-child em {
  background: #fff1dd;
  color: var(--amber);
}

.setting-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.setting-toggle strong,
.setting-toggle small {
  display: block;
}

.setting-toggle small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.setting-toggle input {
  width: 20px;
  height: 20px;
  accent-color: var(--green);
}

.task-list,
.client-list,
.agenda-list {
  display: grid;
  gap: 10px;
}

.task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-soft);
}

.task-card strong,
.task-card span {
  display: block;
}

.task-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eaf1ff;
  color: var(--blue) !important;
  font-size: 0.78rem;
  font-weight: 900;
}

.task-chip.hot {
  background: #fff1dd;
  color: var(--amber) !important;
}

.agenda-list article {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.agenda-list article:last-child {
  border-bottom: 0;
}

.agenda-list time {
  color: var(--green);
  font-weight: 900;
}

.client-list span {
  display: block;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.client-list span:last-child {
  border-bottom: 0;
}

.dashboard-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.lead-table,
.transaction-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.table-row {
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(110px, 1fr) minmax(100px, 1fr) minmax(100px, 0.8fr);
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.transaction-table .table-row {
  grid-template-columns:
    minmax(220px, 1.4fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr)
    minmax(120px, 0.8fr) minmax(90px, 0.6fr) minmax(110px, 0.7fr);
}

.table-row:last-child {
  border-bottom: 0;
}

.table-head {
  min-height: 40px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.table-row em {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  background: #edf6f1;
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

.table-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.storage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  background: #eaf1ff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.upload-zone {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  border: 2px dashed #b9c8bf;
  border-radius: 8px;
  padding: 22px;
  background: var(--panel-soft);
  text-align: center;
  cursor: pointer;
}

.upload-zone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e4f1ea;
  color: var(--green);
  font-weight: 900;
}

.upload-zone small {
  color: var(--muted);
  line-height: 1.35;
}

.document-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.transaction-doc-dropzone {
  min-height: 190px;
  border: 1.5px dashed #b9cce0;
  background: #fbfcff;
}

.compact-doc-dropzone {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  justify-items: start;
  align-items: center;
  min-height: 96px;
  padding: 18px 22px;
  text-align: left;
}

.compact-doc-dropzone strong,
.compact-doc-dropzone small,
.compact-doc-dropzone em {
  margin-top: 0;
}

.compact-doc-dropzone small {
  grid-column: 2;
}

.compact-doc-dropzone em {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.transaction-doc-dropzone span {
  width: 42px;
  height: 42px;
  font-size: 1.45rem;
}

.transaction-doc-dropzone strong {
  margin-top: 2px;
  font-size: 1.05rem;
}

.transaction-doc-dropzone small {
  max-width: 620px;
  font-size: 0.92rem;
  line-height: 1.35;
}

.transaction-doc-dropzone em {
  min-height: 38px;
  margin-top: 4px;
  padding: 0 18px;
  font-size: 0.88rem;
}

.document-list article {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(210px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

#transactionDocumentList.document-list,
#brokerDocumentsList.document-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(7, 48, 79, 0.06);
}

#transactionDocumentList .document-list-head,
#transactionDocumentList article,
#brokerDocumentsList .document-list-head,
#brokerDocumentsList article {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(260px, 0.42fr) minmax(190px, 0.28fr);
  gap: 14px;
  align-items: center;
}

#brokerDocumentsList .document-list-head,
#brokerDocumentsList article {
  grid-template-columns: minmax(360px, 1fr) minmax(220px, 0.46fr) minmax(190px, 0.34fr);
  gap: 22px;
}

#transactionDocumentList .document-list-head,
#transactionDocumentList article {
  grid-template-columns: minmax(440px, 1.3fr) minmax(210px, 0.34fr) minmax(260px, 0.38fr);
  gap: 18px;
}

#transactionDocumentList .document-list-head,
#brokerDocumentsList .document-list-head {
  min-height: 48px;
  padding: 0 22px;
  background: linear-gradient(180deg, #fbfdff, #f5f9fd);
  color: var(--lfn-muted, var(--muted));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#transactionDocumentList article,
#brokerDocumentsList article {
  min-height: 92px;
  border: 0;
  border-top: 1px solid #edf1f6;
  border-radius: 0;
  padding: 16px 22px;
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

#brokerDocumentsList article {
  min-height: 92px;
  padding: 16px 20px;
}

#transactionDocumentList article:hover,
#brokerDocumentsList article:hover {
  background: #fbfcff;
}

.document-list strong,
.document-list small {
  display: block;
}

.document-list small {
  margin-top: 3px;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.84rem;
  font-weight: 800;
}

.document-transaction-meta {
  font-size: 0.78rem;
  font-weight: 700;
}

.review-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  margin-top: 10px;
  border-radius: 999px;
  padding: 0 10px;
  background: #edf4ff;
  color: #356ed0;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-status-badge.approved {
  background: #edf7f1;
  color: #1f7a4f;
}

.review-status-badge.needs_changes {
  background: #fff4e5;
  color: #a76617;
}

.document-file-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid #e1ebf4;
  border-radius: 14px;
  background: linear-gradient(180deg, #eef7fd, #e7f0f8);
  color: var(--lfn-navy, var(--blue));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.document-main {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.document-file-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.document-file-button:hover strong,
.document-file-button:focus-visible strong {
  color: var(--lfn-navy, var(--blue));
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.document-file-button:focus-visible {
  border-radius: 8px;
  outline: 3px solid rgba(7, 48, 79, 0.16);
  outline-offset: 3px;
}

.document-file-button:disabled {
  cursor: default;
}

.document-file-button:disabled:hover strong {
  color: var(--lfn-text, var(--ink));
  text-decoration: none;
}

.document-file-copy {
  display: block;
  min-width: 0;
}

.document-main strong {
  display: block;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--lfn-text, var(--ink));
  font-size: 1rem;
  line-height: 1.2;
}

.document-controls {
  display: grid;
  grid-column: 2;
  gap: 12px;
}

.document-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#transactionDocumentList .document-controls label span {
  display: none;
}

.broker-document-label {
  align-content: center;
  gap: 9px;
  color: var(--lfn-text, var(--ink));
  font-weight: 900;
}

.broker-document-label > span {
  font-size: 0.98rem;
  line-height: 1.15;
}

.broker-document-label .review-status-badge {
  margin-top: 0;
}

.document-controls select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: var(--lfn-text, var(--ink));
  font-weight: 800;
  outline: 0;
}

.document-controls select:focus {
  border-color: var(--lfn-navy, var(--blue));
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.1);
}

.document-size {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.document-actions {
  display: grid;
  grid-template-columns: repeat(2, 74px);
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  grid-column: 3;
  justify-self: end;
  width: auto;
}

.document-actions .danger-action,
.document-actions .needs-action {
  grid-column: auto;
}

.document-actions .compact-action {
  width: 74px;
  min-height: 30px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 0.76rem;
  line-height: 1;
}

.document-actions .danger-action {
  background: #fff8f8;
}

#transactionDocumentList .document-actions {
  display: grid;
  grid-template-columns: repeat(3, 74px);
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
}

#transactionDocumentList .document-actions .compact-action {
  width: 74px;
  min-width: 0;
  min-height: 36px;
  border-radius: 10px;
  padding: 0 8px;
  font-size: 0.76rem;
  letter-spacing: 0;
}

#transactionDocumentList .document-actions .danger-action {
  min-width: 0;
  background: #fff8f8;
}

#transactionDocumentList [data-split-document] {
  border-color: #d6e2ef;
  background: #f8fbfd;
  color: var(--lfn-muted, var(--muted));
}

#transactionDocumentList [data-open-document-preview] {
  background: #ffffff;
}

.upload-card .document-list article[data-open-broker-document-preview] {
  cursor: pointer;
}

.upload-card .document-list article[data-open-broker-document-preview]:hover {
  border-color: rgba(7, 48, 79, 0.2);
  background: #fbfcff;
  box-shadow: 0 10px 24px rgba(7, 48, 79, 0.06);
}

.upload-card .document-list article[data-open-broker-document-preview]:hover strong,
.upload-card .document-list article[data-open-broker-document-preview]:focus-visible strong {
  color: var(--lfn-navy, var(--blue));
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.upload-card .document-list article[data-open-broker-document-preview]:focus-visible {
  outline: 3px solid rgba(7, 48, 79, 0.16);
  outline-offset: 3px;
}

.upload-card .document-list article > div:not(.document-actions) {
  min-width: 0;
}

.upload-card .document-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-card .document-actions {
  grid-column: auto;
  grid-template-columns: repeat(2, minmax(118px, auto));
  width: auto;
  justify-self: center;
}

.upload-card .document-actions:has(.mark-reviewed-action:only-child) {
  grid-template-columns: minmax(132px, auto);
}

.upload-card .document-actions .compact-action {
  width: auto;
  min-width: 118px;
  min-height: 34px;
}

#brokerDocumentsList .document-list-head span:nth-child(2),
#brokerDocumentsList .document-list-head span:nth-child(3),
#brokerDocumentsList .broker-document-label {
  justify-self: center;
  text-align: center;
}

#brokerDocumentsList .broker-document-label .review-status-badge {
  justify-self: center;
}

#brokerDocumentsList .document-main {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
}

#brokerDocumentsList .document-file-icon {
  width: 44px;
  height: 44px;
}

#brokerDocumentsList .document-transaction-meta {
  max-width: 520px;
}

.transaction-document-note {
  margin-bottom: 14px;
  border-color: #dbe5ef;
  background: linear-gradient(180deg, #fbfdff, #f8fbfd);
}

.transaction-document-note span {
  max-width: 820px;
}

.danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #f0c5c5;
  border-radius: 8px;
  background: #fff5f5;
  color: #a83f3f;
  font-weight: 900;
}

.danger-action:hover {
  border-color: #e59a9a;
  background: #ffecec;
}

.danger-action:disabled {
  cursor: progress;
  opacity: 0.68;
}

#transactionDocumentList .document-actions .danger-action {
  min-height: 36px;
  border-radius: 10px;
  background: #fff8f8;
}

.approve-action,
.needs-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  font-weight: 900;
}

.approve-action {
  border: 1px solid #bdddc8;
  background: #effaf3;
  color: #1f7a4f;
}

.approve-action:hover {
  background: #e4f6eb;
}

.needs-action {
  border: 1px solid #f1d2a5;
  background: #fff8ed;
  color: #a76617;
}

.needs-action:hover {
  background: #fff2dd;
}

.document-export-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(320px, auto);
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fbfdff, #f8fbfd);
}

.document-export-panel[hidden] {
  display: none;
}

.document-export-panel div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-export-panel strong,
.document-export-panel span {
  display: block;
}

.document-export-panel strong {
  color: var(--lfn-text, var(--ink));
}

.document-export-panel span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.88rem;
}

.document-export-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(134px, 1fr));
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.document-export-actions .compact-action {
  width: 100%;
  min-height: 34px;
  padding: 0 12px;
}

.document-split-review {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border-top: 1px solid #dbe5ef;
  padding-top: 12px;
}

.document-split-review header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.document-split-review header div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-split-review header .compact-action {
  width: auto;
  justify-self: end;
}

.document-split-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.document-split-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.document-split-list {
  display: grid;
  gap: 8px;
}

.document-split-list article {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(170px, 0.8fr) 74px 74px minmax(220px, 1.2fr);
  gap: 10px;
  align-items: end;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.document-split-list label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-split-list input,
.document-split-list select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 0 10px;
  background: #fbfcff;
  color: var(--lfn-text, var(--ink));
  font-size: 0.9rem;
  font-weight: 800;
}

.document-split-include {
  align-self: stretch;
  grid-template-columns: 18px 1fr;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  background: #f3f7fb;
  color: var(--lfn-navy, var(--blue));
}

.document-split-include input {
  min-height: auto;
  padding: 0;
}

.document-split-footer {
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbfd;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.88rem;
}

body.modal-open {
  overflow: hidden;
}

.document-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 24px);
}

.document-preview-modal[hidden] {
  display: none;
}

.document-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 32, 0.66);
  backdrop-filter: blur(10px);
}

.document-preview-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(1240px, calc(100vw - 28px));
  height: min(92vh, 980px);
  overflow: hidden;
  border: 1px solid rgba(207, 222, 235, 0.92);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 34px 100px rgba(8, 18, 32, 0.38);
}

#brokerDocumentPreviewModal .document-preview-panel,
#clientDocumentPreviewModal .document-preview-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.document-preview-panel header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 70px;
  border-bottom: 1px solid #dbe6f0;
  padding: 14px 16px 14px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.document-preview-panel header > div:first-child {
  min-width: 0;
}

.document-preview-panel h2,
.document-preview-panel p {
  margin: 0;
}

.document-preview-panel h2 {
  display: -webkit-box;
  max-width: none;
  max-height: 2.6em;
  overflow: hidden;
  color: var(--lfn-text, var(--ink));
  font-size: 1.08rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.document-preview-panel p {
  margin-top: 3px;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.86rem;
  font-weight: 800;
}

.document-preview-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
}

.document-preview-actions .compact-action {
  width: auto;
  min-height: 38px;
  border-radius: 8px;
  margin-top: 0;
  padding: 0 14px;
  font-size: 0.82rem;
  line-height: 1;
}

.document-preview-editor {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) auto minmax(560px, 1.7fr);
  gap: 14px;
  align-items: center;
  min-height: 0;
  border-bottom: 1px solid rgba(14, 43, 64, 0.18);
  padding: 14px 18px;
  background:
    radial-gradient(circle at top left, rgba(74, 148, 191, 0.2), transparent 34%),
    linear-gradient(135deg, #103a55 0%, #174d70 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.document-preview-editor[hidden] {
  display: none;
}

.document-preview-editor-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  justify-content: center;
}

.document-preview-editor-copy strong,
.document-preview-editor-copy span {
  display: block;
}

.document-preview-editor-copy strong {
  flex: 0 0 auto;
  border: 1px solid rgba(196, 228, 247, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #f7fbff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.document-preview-editor-copy span {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  max-width: 38ch;
  color: rgba(235, 247, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.document-preview-editor-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: visible;
}

.document-preview-signature-actions {
  display: block;
  min-width: 0;
}

.document-preview-signature-actions:empty {
  display: none;
}

.document-preview-signature-actions .compact-action {
  flex: 1 1 128px;
  width: auto;
  min-width: 128px;
  min-height: 38px;
  border-radius: 8px;
  margin-top: 0;
  padding: 0 14px;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.document-preview-signature-actions .outline-purple {
  border-color: rgba(207, 229, 243, 0.32);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.document-preview-signature-actions .outline-purple:hover,
.document-preview-signature-actions .outline-purple:focus {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.2);
  outline: 0;
}

.preview-signature-workspace {
  display: grid;
  grid-template-columns: minmax(160px, 0.68fr) minmax(360px, 1.45fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(178, 213, 237, 0.28);
  border-radius: 8px;
  padding: 12px;
  background: rgba(7, 32, 48, 0.3);
  color: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 26px rgba(4, 19, 31, 0.12);
}

.preview-signature-workspace-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.preview-signature-workspace-head span,
.preview-signature-workspace-grid span {
  display: block;
  color: rgba(221, 238, 248, 0.68);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.preview-signature-workspace-head strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin-top: 4px;
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-signature-workspace-head em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  border: 1px solid rgba(207, 229, 243, 0.3);
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.preview-signature-workspace-head em.is-signed {
  border-color: rgba(168, 231, 196, 0.48);
  background: rgba(57, 146, 92, 0.24);
}

.preview-signature-workspace-head em.is-needs_signature,
.preview-signature-workspace-head em.is-sent,
.preview-signature-workspace-head em.is-waiting,
.preview-signature-workspace-head em.is-waiting-not-shared {
  border-color: rgba(255, 211, 134, 0.52);
  background: rgba(169, 104, 18, 0.24);
}

.preview-signature-workspace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.preview-signature-workspace-grid article {
  min-width: 0;
  border: 1px solid rgba(207, 229, 243, 0.22);
  border-radius: 7px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.08);
}

.preview-signature-workspace-grid strong,
.preview-signature-workspace-grid small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-signature-workspace-grid strong {
  margin-top: 5px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
}

.preview-signature-workspace-grid small {
  margin-top: 3px;
  color: rgba(221, 238, 248, 0.72);
  font-size: 0.65rem;
  font-weight: 750;
}

.preview-signature-workspace-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  justify-content: flex-end;
  min-width: 0;
}

.preview-signature-workspace-actions .compact-action,
.preview-signature-workspace-actions .muted-label {
  flex: 0 1 auto;
  width: auto;
  min-width: 106px;
  min-height: 34px;
  margin-top: 0;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 0.7rem;
}

.document-preview-signature-actions .purple-button {
  border-color: #6db8e6;
  background: #6db8e6;
  color: #08233a;
}

.document-preview-add-menu {
  position: relative;
  z-index: 18;
}

.document-preview-add-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 112px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  padding: 0 18px;
  background: #ffffff;
  color: #113d5a;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  list-style: none;
  text-transform: uppercase;
}

.document-preview-add-menu summary::-webkit-details-marker {
  display: none;
}

.document-preview-add-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  font-size: 0.72rem;
}

.document-preview-add-menu[open] summary,
.document-preview-add-menu summary:hover,
.document-preview-add-menu summary:focus {
  border-color: #9ed0ef;
  background: #eef7fd;
  color: var(--blue, #2b6f9f);
  outline: 0;
}

.document-preview-add-menu > div {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: 220px;
  overflow: hidden;
  border: 1px solid #d6e4ef;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 22px 42px rgba(6, 26, 42, 0.24);
}

.document-preview-add-menu button {
  min-height: 38px;
  border: 0;
  padding: 0 13px;
  background: transparent;
  color: #123650;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: left;
  text-transform: none;
}

.document-preview-add-menu button:hover,
.document-preview-add-menu button:focus,
.document-preview-add-menu button.active,
.document-preview-add-menu button[aria-pressed="true"] {
  background: #edf6fd;
  color: #08233a;
  outline: 0;
}

.document-preview-page-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  padding: 0 12px;
  background: #f8fbfd;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.8rem;
  font-weight: 900;
  white-space: nowrap;
}

.document-preview-page-pill[hidden] {
  display: none;
}

.document-preview-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--lfn-navy, var(--blue));
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
}

.document-preview-close:hover {
  border-color: #b9cce0;
  background: #eef5fb;
}

.document-preview-body {
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding: 14px;
  background:
    linear-gradient(180deg, #f7f9fc 0%, #edf3f8 100%);
}

.document-preview-body iframe {
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 9px;
  background: #ffffff;
}

.pdf-preview-scroll {
  display: grid;
  gap: 18px;
  justify-items: center;
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 20px;
  overscroll-behavior: contain;
}

.pdf-preview-page {
  position: relative;
  max-width: min(100%, 1000px);
  border: 1px solid rgba(206, 221, 233, 0.9);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(8, 18, 32, 0.16);
}

.pdf-preview-scroll canvas {
  display: block;
  width: 100%;
  max-width: min(100%, 1000px);
  height: auto;
  border-radius: 9px;
  background: #ffffff;
}

.pdf-signature-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.pdf-signature-field {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 18px;
  min-height: 18px;
  overflow: visible;
  border: 1.5px solid var(--lfn-navy, #07304f);
  border-radius: 3px;
  padding: 0 18px 0 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--lfn-navy, #07304f);
  cursor: move;
  font-size: var(--signature-field-font-size, 11px);
  line-height: 1;
  box-shadow: 0 2px 8px rgba(8, 36, 59, 0.12);
  user-select: none;
}

.pdf-signature-field > strong {
  overflow: hidden;
  width: 100%;
  color: inherit;
  font-size: max(0.62rem, calc(var(--signature-field-font-size, 11px) * 0.72));
  font-weight: 900;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  text-transform: none;
}

.pdf-signature-field button {
  position: absolute;
  top: -8px;
  right: -8px;
  display: none;
  width: 18px;
  height: 18px;
  border: 1px solid #c8d8e8;
  border-radius: 999px;
  background: #ffffff;
  color: var(--lfn-navy, #07304f);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(8, 36, 59, 0.18);
}

.pdf-signature-field i {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--lfn-navy, #07304f);
  border-bottom: 2px solid var(--lfn-navy, #07304f);
  cursor: nwse-resize;
}

.pdf-signature-field.is-selected {
  border-color: var(--lfn-navy, #07304f);
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 0 0 2px rgba(7, 48, 79, 0.16),
    0 8px 18px rgba(8, 36, 59, 0.16);
}

.pdf-signature-field.is-selected button,
.pdf-signature-field.is-selected i,
.pdf-signature-field:hover button,
.pdf-signature-field:hover i {
  display: grid;
  place-items: center;
}

.pdf-signature-field-popover {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  z-index: 5;
  display: grid;
  width: min(100%, 320px);
  min-width: 230px;
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid #c8deef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(8, 18, 32, 0.2);
}

.pdf-signature-field-popover > span {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-right: 8px solid transparent;
  border-bottom: 8px solid #ffffff;
  border-left: 8px solid transparent;
}

.pdf-signature-assignment {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #e3edf5;
}

.pdf-signature-assignment strong {
  color: #123650;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.pdf-signature-assignment div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.pdf-signature-field-popover button {
  position: static;
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid #e3edf5;
  background: transparent;
  color: #123650;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.pdf-signature-field-popover > button:last-child {
  border-bottom: 0;
}

.pdf-signature-field-popover button:hover,
.pdf-signature-field-popover button:focus,
.pdf-signature-field-popover button[aria-pressed="true"] {
  background: #edf6fd;
  outline: 0;
}

.pdf-signature-field-popover button[aria-pressed="true"] {
  color: #08233a;
  box-shadow: inset 0 0 0 1px #9ecff0;
}

.pdf-signature-assignment button,
.pdf-signature-assignment button:last-child {
  height: 32px;
  border: 1px solid #d7e7f3;
  border-radius: 6px;
  font-size: 0.72rem;
}

.pdf-signature-field.is-locked {
  border-color: #9aa9b7;
  background: rgba(238, 243, 247, 0.8);
  cursor: default;
}

.document-preview-body img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(8, 18, 32, 0.16);
}

.document-preview-empty {
  max-width: 420px;
  background: #ffffff;
}

.signature-adopt-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
}

.signature-adopt-modal[hidden] {
  display: none;
}

.signature-adopt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 18, 0.7);
}

.signature-adopt-panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(550px, calc(100vw - 32px));
  overflow: hidden;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(8, 18, 32, 0.42);
}

.signature-adopt-panel header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 18px 28px;
  background: #5aadef;
  color: #ffffff;
}

.signature-adopt-panel h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0;
}

.signature-adopt-panel header button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
}

.signature-adopt-panel header button:hover,
.signature-adopt-panel header button:focus {
  background: rgba(255, 255, 255, 0.16);
  outline: 0;
}

.signature-adopt-body {
  display: grid;
  gap: 20px;
  padding: 28px 30px 12px;
}

.signature-adopt-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 0.36fr);
  gap: 22px;
}

.signature-adopt-fields label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.signature-adopt-fields span,
.signature-adopt-previews span {
  color: #8a8f96;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.signature-adopt-fields input {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #cfdce8;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #1b2d3a;
  font-size: 0.92rem;
  font-weight: 500;
  outline: 0;
}

.signature-adopt-fields input:focus {
  border-bottom-color: #58aeea;
  box-shadow: 0 1px 0 #58aeea;
}

.signature-adopt-extra-fields[hidden] {
  display: none;
}

.signature-adopt-extra-fields {
  display: grid;
  gap: 12px;
  border: 1px solid #dfeaf2;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfd;
}

.signature-adopt-extra-head {
  display: grid;
  gap: 3px;
}

.signature-adopt-extra-head strong {
  color: #17364b;
  font-size: 0.9rem;
  font-weight: 900;
}

.signature-adopt-extra-head span {
  color: #617285;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.signature-adopt-extra-grid {
  display: grid;
  gap: 12px;
}

.signature-adopt-extra-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.signature-adopt-extra-grid label > span {
  color: #526477;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.signature-adopt-extra-grid input[type="text"] {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbddea;
  border-radius: 7px;
  padding: 0 10px;
  background: #ffffff;
  color: #17364b;
  font-size: 0.9rem;
  font-weight: 700;
}

.signature-adopt-extra-grid input[type="text"]:focus {
  border-color: #58aeea;
  box-shadow: 0 0 0 3px rgba(88, 174, 234, 0.18);
  outline: 0;
}

.signature-adopt-checkbox {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
}

.signature-adopt-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0b4268;
}

.signature-adopt-previews {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.38fr);
  border: 1px solid #e2e7eb;
  background: #f3f4f2;
}

.signature-adopt-previews div {
  display: grid;
  gap: 9px;
  align-content: center;
  min-height: 96px;
  padding: 14px 18px 10px;
}

.signature-adopt-previews div + div {
  border-left: 1px solid #e0e5e8;
}

.signature-adopt-previews strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #050a0d;
  font-family: "Brush Script MT", "Segoe Script", "Snell Roundhand", cursive;
  font-size: clamp(2.1rem, 6vw, 3.05rem);
  font-weight: 500;
  line-height: 0.92;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-adopt-consent {
  margin: 0;
  color: #8a8f96;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
}

.signature-adopt-message {
  min-height: 18px;
  margin: -6px 0 0;
  color: #b3422f;
  font-size: 0.82rem;
  font-weight: 800;
}

.signature-adopt-panel footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 30px 30px;
}

.signature-adopt-panel footer .compact-action {
  width: auto;
  min-width: 150px;
  min-height: 42px;
  border-radius: 999px;
  margin-top: 0;
}

@media (max-width: 1180px) {
  .preview-signature-workspace {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .preview-signature-workspace-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .preview-signature-workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-signature-workspace-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 1040px) {
  .document-preview-actions {
    flex-wrap: wrap;
  }

  .document-preview-editor {
    grid-template-columns: minmax(260px, 1fr) auto;
  }

  .document-preview-signature-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .preview-signature-workspace-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .document-preview-modal {
    padding: 10px;
  }

  .document-preview-panel {
    width: 100%;
    height: 92vh;
  }

  .document-preview-panel header {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .document-preview-panel h2 {
    max-width: calc(100vw - 44px);
  }

  .document-preview-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
    width: 100%;
  }

  .document-preview-actions .compact-action,
  .document-preview-page-pill,
  .document-preview-close {
    width: 100%;
  }

  .document-preview-page-pill,
  .document-preview-close {
    justify-content: center;
  }

  .document-preview-editor {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .document-preview-editor-actions,
  .document-preview-signature-actions {
    justify-content: flex-start;
  }

  .document-preview-add-menu {
    width: 100%;
  }

  .document-preview-add-menu summary,
  .document-preview-signature-actions .compact-action {
    width: 100%;
  }

  .document-preview-add-menu > div {
    position: static;
    width: min(100%, 260px);
    margin-top: 8px;
  }

  .preview-signature-workspace-head,
  .preview-signature-workspace-grid {
    grid-template-columns: 1fr;
  }

  .document-preview-signature-actions .compact-action {
    flex: 1 1 100%;
    max-width: none;
  }

  .pdf-preview-scroll {
    padding: 12px;
  }

  .signature-adopt-panel header,
  .signature-adopt-body,
  .signature-adopt-panel footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .signature-adopt-fields,
  .signature-adopt-previews {
    grid-template-columns: 1fr;
  }

  .signature-adopt-previews div + div {
    border-top: 1px solid #e0e5e8;
    border-left: 0;
  }

  .signature-adopt-panel footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .signature-adopt-panel footer .compact-action {
    width: 100%;
  }
}

.commission-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.commission-summary article {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 116px;
  border: 1px solid #dfe8f0;
  border-radius: 8px;
  padding: 16px 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(7, 48, 79, 0.045), transparent 11rem),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.commission-summary article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--payout-accent, #c9d8e6);
  opacity: 0.9;
}

.commission-summary span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-transform: uppercase;
}

.commission-summary strong {
  color: var(--lfn-text, var(--ink));
  font-size: clamp(1.75rem, 2.2vw, 2.35rem);
  line-height: 0.95;
}

.payout-due {
  --payout-accent: #0f9a76;
}

.payout-projected {
  --payout-accent: #e88112;
}

.payout-count {
  --payout-accent: #256bd8;
}

.commission-queue {
  display: grid;
  gap: 9px;
}

.commission-queue-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) minmax(190px, 0.55fr) 76px;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  border: 1px solid #dfe8f0;
  border-left: 4px solid #d8e3ee;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(17, 39, 65, 0.035);
}

.commission-queue-row:hover {
  border-color: #cbd8e6;
  background: #fbfdff;
}

.commission-queue-detail-link {
  color: inherit;
  min-width: 0;
  text-decoration: none;
}

.commission-queue-row.due {
  border-left-color: #0d6b9f;
}

.commission-queue-row.projected {
  border-left-color: #e88112;
}

.commission-queue-row.setup {
  border-left-color: #256bd8;
}

.commission-queue-status {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
  background: #eef5fb;
  color: var(--lfn-navy);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.commission-queue-row.due .commission-queue-status {
  background: #e9f5ff;
  color: #0d5f90;
}

.commission-queue-row.projected .commission-queue-status {
  background: #fff3e4;
  color: #a56510;
}

.commission-queue-row.setup .commission-queue-status {
  background: #edf4ff;
  color: #356ed0;
}

.commission-queue-row strong,
.commission-queue-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commission-queue-row strong {
  font-size: 0.94rem;
  line-height: 1.18;
}

.commission-queue-row small {
  margin-top: 4px;
  color: var(--lfn-muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.commission-queue-row em,
.commission-received-button {
  display: inline-grid;
  place-items: center;
  min-height: 36px;
  border: 1px solid #c8d6e6;
  border-radius: 8px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.commission-received-button {
  cursor: pointer;
}

.commission-received-button:hover {
  border-color: #9fb8ce;
  background: #f2f8fd;
}

.commission-received-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.commission-bars {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.commission-bars div {
  display: grid;
  grid-template-columns: minmax(100px, 0.9fr) minmax(120px, 1.3fr) auto;
  gap: 10px;
  align-items: center;
}

.commission-bars span {
  color: var(--muted);
  font-weight: 800;
}

meter {
  width: 100%;
  height: 12px;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: #e4ebe7;
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.listing-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.board-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #eef3ef;
}

.board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--green-dark);
  font-weight: 900;
}

.board-heading strong {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #ffffff;
}

.listing-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(28, 43, 37, 0.08);
}

.listing-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 980px) {
  .site-header,
  .site-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: 74vh;
  }

  .section,
  .agent-access,
  .portal-grid,
  .dashboard-row,
  .broker-grid,
  .agent-form,
  .crm-command,
  .crm-layout {
    grid-template-columns: 1fr;
  }

  .crm-stage-strip {
    grid-template-columns: repeat(5, minmax(124px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .metric-grid,
  .listing-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-page {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-nav,
  .hero-actions,
  .form-options,
  .portal-topbar,
  .portal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    min-height: 36px;
  }

  h1 {
    font-size: clamp(2.6rem, 14vw, 4.6rem);
  }

  .community-grid,
  .metric-grid,
  .listing-board,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .agent-access {
    grid-template-columns: 1fr;
  }

  .password-row {
    grid-template-columns: 1fr;
  }

  .table-row {
    grid-template-columns: 1fr;
    gap: 4px;
    align-items: start;
    padding: 12px;
  }

  .transaction-table .table-row {
    grid-template-columns: 1fr;
  }

  .table-head {
    display: none;
  }

  .task-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .agent-row,
  .document-list article,
  .commission-bars div,
  .setting-toggle,
  .activity-timeline article {
    grid-template-columns: 1fr;
  }

  #transactionDocumentList .document-list-head,
  #brokerDocumentsList .document-list-head {
    display: none;
  }

  #transactionDocumentList article,
  #brokerDocumentsList article {
    grid-template-columns: 1fr;
  }

  #transactionDocumentList .document-controls,
  #brokerDocumentsList .document-controls {
    display: grid;
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  #transactionDocumentList .document-controls label span {
    display: block;
  }

  .document-checklist-summary,
  .document-checklist-groups section > div,
  .transaction-document-summary-grid {
    grid-template-columns: 1fr;
  }

  .document-actions,
  .document-export-panel {
    grid-column: auto;
    grid-template-columns: 1fr;
    width: 100%;
    justify-self: stretch;
    justify-content: flex-start;
  }

  .document-export-actions,
  .document-split-review header,
  .document-split-footer {
    align-items: stretch;
    flex-direction: column;
    justify-items: stretch;
    text-align: left;
  }

  .document-split-list article {
    grid-template-columns: 1fr;
  }

  .document-split-review header {
    grid-template-columns: 1fr;
  }

  .document-split-review header .compact-action {
    justify-self: stretch;
  }

  .document-split-header-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Portal polish pass */
.lfn-dashboard {
  --lfn-bg: #f3f6fb;
  --lfn-text: #101827;
  --lfn-muted: #5f6b7d;
  --lfn-line: #dfe6f0;
  --lfn-card: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(198, 162, 71, 0.1), transparent 25rem),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

.lfn-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 20% 0%, rgba(240, 200, 90, 0.18), transparent 17rem),
    linear-gradient(180deg, #101a2a 0%, #0b1320 100%);
  box-shadow: 18px 0 44px rgba(12, 22, 38, 0.18);
}

.lfn-logo {
  align-items: center;
  grid-template-columns: 54px minmax(0, 1fr);
  justify-items: start;
  text-align: left;
}

.lfn-logo-icon {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(240, 200, 90, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lfn-gold-2);
  font-size: 1.35rem;
}

.lfn-logo strong {
  font-size: 0.98rem;
  letter-spacing: 0.13em;
}

.lfn-logo small {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
}

.lfn-nav {
  gap: 5px;
}

.lfn-nav a {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.94rem;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.lfn-nav a span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.lfn-nav a.active,
.lfn-nav a:hover {
  border-color: rgba(240, 200, 90, 0.34);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: none;
  transform: translateX(2px);
}

.lfn-nav a.active span,
.lfn-nav a:hover span {
  background: var(--lfn-gold);
  color: #111827;
}

.help-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.lfn-main {
  padding: 28px clamp(22px, 3vw, 42px);
}

.lfn-topbar {
  align-items: flex-start;
  border-bottom: 1px solid rgba(223, 230, 240, 0.86);
  padding-bottom: 22px;
}

.lfn-topbar h1 {
  font-size: clamp(1.7rem, 2vw, 2.2rem);
  letter-spacing: 0;
}

.lfn-topbar p {
  color: #657288;
}

.purple-button,
.outline-purple,
.mini-action,
.alert-card button,
.modern-row button {
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

.purple-button {
  min-height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, #111c2d, #20324d);
  box-shadow: 0 14px 28px rgba(17, 28, 45, 0.18);
}

.purple-button:hover {
  background: linear-gradient(135deg, #1b2a42, #2d4263);
  transform: translateY(-1px);
}

.outline-purple,
.top-link {
  border-color: #d7c276;
  background: #fffdf7;
  color: #2c3444;
}

.outline-purple:hover,
.top-link:hover,
.mini-action:hover,
.alert-card button:hover {
  border-color: var(--lfn-gold);
  box-shadow: 0 10px 24px rgba(38, 52, 82, 0.08);
  transform: translateY(-1px);
}

.bell-button {
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(31, 45, 71, 0.08);
}

.user-menu {
  border-left-color: #dce4ee;
}

.transaction-topbar-actions .user-menu {
  width: auto;
  justify-content: flex-end;
  min-height: 52px;
  border-left: 0;
  margin-left: 0;
  padding-left: 0;
  gap: 10px;
}

.transaction-topbar-actions .user-menu::before {
  content: none;
}

.transaction-topbar-actions .user-photo {
  width: 46px;
  height: 46px;
  font-size: 0.96rem;
}

.transaction-topbar-actions .user-menu strong {
  font-size: 0.98rem;
  line-height: 1.05;
}

.transaction-topbar-actions .user-menu small {
  font-size: 0.84rem;
}

.transaction-topbar-actions .user-menu a {
  margin-left: 4px;
  font-size: 0.86rem;
}

.transaction-action-buttons .transaction-cancel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #c8d6e5;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  color: var(--lfn-navy);
}

.transaction-action-buttons .transaction-cancel-link:hover {
  border-color: var(--lfn-navy);
  background: #ffffff;
}

.user-photo,
.agent-avatar {
  border: 2px solid #ffffff;
  box-shadow: 0 8px 18px rgba(17, 28, 45, 0.14);
}

.summary-cards {
  gap: 16px;
  align-items: stretch;
}

.summary-card,
.white-card {
  border-color: rgba(214, 224, 238, 0.9);
  border-radius: 8px;
  box-shadow:
    0 16px 40px rgba(30, 44, 69, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.summary-card {
  min-height: 118px;
}

.summary-card:hover,
.white-card:hover {
  border-color: #d2dceb;
}

.summary-icon {
  border-color: rgba(209, 219, 232, 0.86);
  box-shadow:
    0 8px 18px rgba(17, 28, 45, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.summary-icon:not(:has(svg)) {
  font-size: 1.05rem;
  line-height: 1;
}

.summary-card strong {
  letter-spacing: 0;
}

.summary-card a,
.card-header a,
.card-link,
.quick-links a {
  color: #17345c;
}

.deadline-alerts {
  gap: 16px;
}

.alert-card {
  border-left-width: 3px;
  box-shadow: 0 12px 30px rgba(30, 44, 69, 0.06);
}

.alert-card > span {
  border-radius: 8px;
}

.card-header {
  gap: 14px;
}

.transactions-card > .card-header {
  align-items: center;
  margin-bottom: 16px;
}

.transactions-card > .card-header h2 {
  font-size: 1.18rem;
}

.transaction-card-actions .purple-button {
  color: #ffffff;
}

.transaction-card-actions .outline-purple {
  color: var(--lfn-navy);
}

.card-header h2,
.card-header h3 {
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.15;
}

.transactions-card .modern-row,
.modern-head {
  gap: 12px;
}

.modern-head {
  min-height: 46px;
  background: #f8fbfd;
  border-bottom: 1px solid var(--lfn-line);
  padding-bottom: 0;
  letter-spacing: 0.04em;
}

.modern-row {
  border-bottom: 1px solid #edf1f6;
}

.modern-row:hover {
  background: #fafcff;
}

.transaction-click-row {
  cursor: pointer;
}

.transaction-click-row:focus-visible {
  outline: 3px solid rgba(7, 48, 79, 0.22);
  outline-offset: -3px;
}

.modern-row button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.modern-row button:hover {
  background: #eef3fa;
  color: #111827;
}

.row-action-link {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--lfn-muted);
  font-size: 1.7rem;
  font-weight: 900;
  text-decoration: none;
}

.row-action-link:hover {
  background: #eef3fa;
  color: var(--lfn-navy);
}

.deadline-mini-list,
.review-mini-list {
  display: grid;
  gap: 10px;
}

.transaction-deadlines-card .deadline-mini-list {
  gap: 8px;
}

.deadline-mini-list article,
.review-mini-list article {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
}

.transaction-deadlines-card .deadline-mini-list article {
  grid-template-columns: 124px minmax(0, 1fr) auto;
  min-height: 74px;
  padding: 10px 12px;
  background: #ffffff;
}

.deadline-mini-list article > div:not(.deadline-mini-actions),
.review-mini-list article > div {
  min-width: 0;
}

.deadline-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.deadline-mini-actions .complete-deadline-action,
.deadline-mini-actions .outline-purple {
  min-height: 36px;
  border-width: 1px;
  box-shadow: none;
  font-size: 0.86rem;
}

.deadline-mini-list article.urgent {
  border-color: #dbe5ef;
  border-left: 4px solid #db3939;
  background: #ffffff;
}

.deadline-mini-list article.urgent span {
  background: #fff0f0;
  color: #c43131;
}

.deadline-mini-list article.warning {
  border-color: #dbe5ef;
  border-left: 4px solid #f09734;
  background: #ffffff;
}

.deadline-mini-list article.warning span {
  background: #fff1dd;
  color: #ad7518;
}

.review-mini-list article {
  grid-template-columns: minmax(0, 1fr) auto;
}

.deadline-mini-list span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: #eef5fb;
  color: var(--lfn-navy);
  font-weight: 900;
  font-size: 0.78rem;
}

.transaction-deadlines-card .deadline-mini-list span {
  min-height: 54px;
  padding: 0 10px;
  background: #edf5fb;
  font-size: 0.82rem;
  line-height: 1.15;
  text-align: center;
}

.transaction-deadlines-card .deadline-mini-list strong {
  font-size: 0.94rem;
  line-height: 1.2;
}

.deadline-mini-list strong,
.deadline-mini-list small,
.review-mini-list strong,
.review-mini-list small {
  display: block;
}

.deadline-mini-list small,
.review-mini-list small {
  margin-top: 4px;
  color: var(--lfn-muted);
}

.transaction-deadlines-card .deadline-mini-list small {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-deadline-queue {
  gap: 9px;
}

.deadline-queue-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  border: 1px solid #e3ebf3;
  border-radius: 8px;
  padding: 9px 12px;
  background: #f8fbff;
}

.deadline-queue-summary strong {
  font-size: 0.88rem;
  line-height: 1;
}

.deadline-queue-summary span {
  display: block;
  min-height: 0;
  padding: 0;
  background: transparent;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.transaction-deadlines-card .transaction-deadline-queue article {
  grid-template-columns: 70px minmax(0, 1fr) 88px;
  gap: 12px;
  min-height: 82px;
  padding: 10px 12px;
  box-shadow: 0 8px 20px rgba(17, 39, 65, 0.035);
}

.transaction-deadlines-card .transaction-deadline-date,
.transaction-deadlines-card .transaction-deadline-queue article.urgent .transaction-deadline-date,
.transaction-deadlines-card .transaction-deadline-queue article.warning .transaction-deadline-date {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 70px;
  min-height: 62px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 5px 4px;
  background: #eef5fb;
  color: var(--lfn-navy);
  line-height: 1;
}

.transaction-deadlines-card .transaction-deadline-queue article.urgent .transaction-deadline-date {
  border-color: #f3d0d0;
  background: #fff0f0;
  color: #c43131;
}

.transaction-deadlines-card .transaction-deadline-queue article.warning .transaction-deadline-date {
  border-color: #f4dab8;
  background: #fff3e4;
  color: #a56510;
}

.transaction-deadline-date i,
.transaction-deadline-date b {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.transaction-deadline-date em {
  margin: 3px 0 2px;
  font-style: normal;
  font-size: 1.36rem;
  font-weight: 950;
}

.transaction-deadline-queue .deadline-mini-copy {
  align-self: center;
}

.transaction-deadline-queue .deadline-mini-copy strong {
  overflow: hidden;
  font-size: 1rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-deadline-queue .deadline-mini-copy small {
  overflow: hidden;
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-deadline-queue .deadline-mini-copy em {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-right: 8px;
  border-radius: 7px;
  padding: 0 7px;
  background: #eef5fb;
  color: var(--lfn-navy);
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.transaction-deadline-queue .deadline-mini-actions {
  justify-content: stretch;
}

.transaction-deadline-queue .deadline-mini-actions .compact-action {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.compact-upcoming-card .card-header {
  margin-bottom: 12px;
}

.compact-upcoming-card .deadline-mini-list {
  gap: 8px;
}

.compact-upcoming-card .deadline-mini-list article {
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  padding: 9px;
}

.compact-upcoming-card .deadline-mini-list span {
  min-height: 38px;
  padding: 0 8px;
  font-size: 0.72rem;
  line-height: 1.1;
  text-align: center;
}

.compact-upcoming-card .deadline-mini-list strong {
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-upcoming-card .deadline-mini-list small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-upcoming-card .deadline-mini-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-width: 86px;
}

.compact-upcoming-card .deadline-mini-actions .compact-action {
  min-width: 0;
  min-height: 32px;
  padding: 0 9px;
  font-size: 0.78rem;
}

.calendar-deadline-list {
  gap: 9px;
}

.calendar-deadline-list article {
  grid-template-columns: 58px minmax(0, 1fr) 222px;
  gap: 14px;
  min-height: 78px;
  padding: 10px 12px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(17, 39, 65, 0.04);
}

.calendar-deadline-list article.urgent,
.calendar-deadline-list article.warning {
  background: #ffffff;
}

.calendar-deadline-list .calendar-deadline-date,
.calendar-deadline-list article.urgent .calendar-deadline-date,
.calendar-deadline-list article.warning .calendar-deadline-date {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 58px;
  min-height: 58px;
  padding: 6px 4px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #eef5fb;
  color: var(--lfn-navy);
  line-height: 1;
  text-align: center;
}

.calendar-deadline-list article.urgent .calendar-deadline-date {
  border-color: #f4cece;
  background: #fff0f0;
  color: #c43131;
}

.calendar-deadline-list article.warning .calendar-deadline-date {
  border-color: #f5dab8;
  background: #fff3e4;
  color: #a56510;
}

.calendar-deadline-date i {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.calendar-deadline-date em {
  margin-top: 3px;
  font-style: normal;
  font-size: 1.4rem;
  font-weight: 950;
}

.calendar-deadline-list .deadline-mini-copy {
  align-self: center;
}

.calendar-deadline-list strong {
  overflow: hidden;
  font-size: 0.98rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-deadline-list small {
  overflow: hidden;
  margin-top: 3px;
  font-size: 0.84rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-deadline-list .deadline-mini-actions {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) 78px;
  gap: 8px;
  justify-content: stretch;
  align-items: center;
}

.calendar-deadline-list .deadline-mini-actions .compact-action {
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1;
  text-align: center;
}

.property-thumb {
  border: 1px solid #e7edf4;
  box-shadow: 0 8px 18px rgba(17, 28, 45, 0.1);
}

.dot {
  box-shadow: 0 0 0 4px rgba(84, 123, 216, 0.1);
}

.green-dot {
  box-shadow: 0 0 0 4px rgba(78, 184, 106, 0.12);
}

.orange-dot {
  box-shadow: 0 0 0 4px rgba(240, 151, 52, 0.14);
}

.violet-dot {
  box-shadow: 0 0 0 4px rgba(124, 99, 217, 0.12);
}

.gray-dot {
  box-shadow: 0 0 0 4px rgba(122, 135, 151, 0.14);
}

.financial-row em.canceled {
  background: #eef2f6;
  color: #5f6c7c;
}

.modern-upload,
.home-photo-upload {
  border-color: #d5c894;
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.8), rgba(255, 255, 255, 0.92));
}

.modern-upload span,
.home-photo-upload span {
  border-radius: 8px;
  background: #fff6df;
  color: #9b721f;
  font-size: 1.55rem;
}

.file-icon {
  border: 0;
  background: #f4f7fb;
}

.review-list article,
.recent-docs article,
.message-list article,
.focus-list article,
.date-list article {
  border-color: #edf1f6;
}

.quick-links a,
.review-list article,
.recent-docs article {
  border-radius: 8px;
}

.quick-links a:hover {
  background: #fafcff;
  color: #0f2748;
}

input,
select,
textarea {
  outline-color: var(--lfn-gold);
}

.transaction-entry-form input,
.transaction-entry-form select,
.transaction-entry-form textarea,
.agent-page-form input,
.agent-page-form select,
.agent-page-form textarea,
.settings-modern label,
.ai-marketing-form input,
.ai-marketing-form select,
.ai-marketing-form textarea,
.landing-form input,
.landing-form textarea,
.reminder-form input,
.reminder-form select,
.reminder-form textarea {
  border-color: #dfe6f0;
}

.transaction-entry-form input:focus,
.transaction-entry-form select:focus,
.transaction-entry-form textarea:focus,
.agent-page-form input:focus,
.agent-page-form select:focus,
.agent-page-form textarea:focus,
.ai-marketing-form input:focus,
.ai-marketing-form select:focus,
.ai-marketing-form textarea:focus,
.landing-form input:focus,
.landing-form textarea:focus,
.reminder-form input:focus,
.reminder-form select:focus,
.reminder-form textarea:focus {
  border-color: var(--lfn-gold);
  box-shadow: 0 0 0 3px rgba(198, 162, 71, 0.14);
}

.status-badge,
.agent-list-modern em,
.financial-row em {
  border-radius: 8px;
  font-weight: 900;
}

@media (max-width: 820px) {
  .lfn-topbar {
    align-items: stretch;
  }

  .transaction-entry-topbar {
    align-items: stretch;
  }

  .transaction-topbar-title {
    min-width: 0;
  }

  .profile-hero {
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: 0;
    padding: 20px;
  }

  .profile-hero-copy,
  .profile-edit-header {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-edit-button,
  .profile-edit-header .form-actions,
  .profile-edit-header .form-actions button {
    width: 100%;
  }

  .profile-icon-action {
    width: 44px;
    height: 42px;
  }

  .profile-hero-actions {
    justify-content: stretch;
    width: 100%;
  }

  .agent-profile-stats,
  .profile-field-grid {
    grid-template-columns: 1fr;
  }

  .agent-headshot-control {
    grid-template-columns: 1fr;
  }

  .agent-headshot-control .profile-photo {
    justify-self: start;
  }

  .agent-profile-transactions-list .modern-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 0;
  }

  .agent-profile-transactions-list .modern-head {
    display: none;
  }

  .agent-profile-transactions-list b {
    text-align: left;
  }

  .profile-photo {
    width: 94px;
    height: 94px;
  }

  .profile-detail-panel,
  .profile-field-grid {
    grid-template-columns: 1fr;
  }

  .profile-detail-group + .profile-detail-group {
    border-top: 1px solid #e3ebf3;
    border-left: 0;
    padding-top: 22px;
    padding-left: 0;
  }

  .transaction-topbar-actions,
  .transaction-action-buttons {
    width: 100%;
  }

  .transaction-action-buttons {
    flex-direction: column;
  }

  .transaction-action-buttons .purple-button,
  .transaction-action-buttons .top-link {
    width: 100%;
  }

  .transaction-work-grid .card-header {
    align-items: stretch;
  }

  .transactions-card .modern-head {
    display: none;
  }

  .transactions-card .modern-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .transactions-card .transaction-click-row {
    min-height: 0;
    padding: 14px;
  }

  .transaction-row-agent,
  .transaction-row-status,
  .transaction-row-date,
  .transaction-row-money {
    gap: 3px;
  }

  .transactions-card > .card-header,
  .transaction-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .transaction-search-panel {
    grid-template-columns: 1fr;
  }

  .transaction-search-tools {
    justify-content: center;
  }

  .transaction-search-tools small {
    text-align: center;
  }

  .transaction-card-actions .compact-action {
    width: 100%;
  }

  .transaction-work-grid .card-header a {
    width: 100%;
  }

  .transaction-deadlines-card .deadline-mini-list article {
    grid-template-columns: 1fr;
  }

  .transaction-deadlines-card .deadline-mini-list span {
    justify-self: start;
    min-height: 36px;
    min-width: 132px;
  }

  .transaction-deadlines-card .deadline-mini-list small {
    white-space: normal;
  }

  .deadline-queue-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .deadline-queue-summary span {
    text-align: left;
  }

  .transaction-deadlines-card .transaction-deadline-queue article {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .transaction-deadlines-card .transaction-deadline-date {
    justify-self: start;
    min-width: 70px;
    min-height: 62px;
  }

  .transaction-deadline-queue .deadline-mini-actions {
    grid-column: 1 / -1;
  }

  .compact-upcoming-card .deadline-mini-list article {
    grid-template-columns: 1fr;
  }

  .compact-upcoming-card .deadline-mini-list span {
    justify-self: start;
    min-width: 118px;
  }

  .compact-upcoming-card .deadline-mini-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .calendar-deadline-list article {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .calendar-deadline-list .deadline-mini-actions {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(92px, 0.55fr);
    width: 100%;
  }

  .transaction-topbar-actions .user-menu {
    justify-content: flex-start;
  }

  .transaction-topbar-actions .user-menu::before {
    display: none;
  }

  .user-menu {
    margin-left: 0;
    border-left: 0;
    padding-left: 0;
  }

  .agent-roster-row > em {
    justify-self: start;
  }
}

/* Live Florida Now navy/white brand theme */
.lfn-dashboard {
  --lfn-navy: #07304f;
  --lfn-navy-2: #0b3c62;
  --lfn-gold: #07304f;
  --lfn-gold-2: #dbe9f5;
  --lfn-purple: #0b4d78;
  --lfn-bg: #f4f7fb;
  --lfn-text: #0b1b2d;
  --lfn-muted: #5d6c7f;
  --lfn-line: #dbe5ef;
  background:
    radial-gradient(circle at top right, rgba(7, 48, 79, 0.08), transparent 26rem),
    linear-gradient(180deg, #fbfdff 0%, #eef4f9 100%);
}

.lfn-sidebar {
  background: linear-gradient(180deg, #07304f 0%, #051f35 100%);
  box-shadow: 16px 0 42px rgba(5, 31, 53, 0.18);
}

.lfn-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  border: 0;
  border-radius: 0;
  padding: 4px 2px 16px;
  background: transparent;
  box-shadow: none;
}

.lfn-logo img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
}

.lfn-logo-icon,
.lfn-logo > span {
  display: none;
}

.lfn-nav a {
  color: rgba(255, 255, 255, 0.82);
}

.lfn-nav a span {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.lfn-nav a.active,
.lfn-nav a:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.lfn-nav a.active span,
.lfn-nav a:hover span {
  background: #ffffff;
  color: var(--lfn-navy);
}

.transaction-mark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.transaction-mark path,
.transaction-mark circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.transaction-mark .transaction-mark-coin {
  fill: #6ea8ff;
}

.transaction-mark .transaction-mark-dollar {
  stroke: #ffffff;
  stroke-width: 1.7;
}

.purple-button {
  background: linear-gradient(135deg, #07304f, #0c4773);
  box-shadow: 0 14px 28px rgba(7, 48, 79, 0.2);
}

.purple-button:hover {
  background: linear-gradient(135deg, #0a3b60, #115985);
}

.outline-purple,
.top-link {
  border-color: #b9cce0;
  background: #ffffff;
  color: var(--lfn-navy);
}

.outline-purple:hover,
.top-link:hover,
.mini-action:hover,
.alert-card button:hover {
  border-color: var(--lfn-navy);
}

.alert-card-actions .compact-action,
.alert-card-actions .outline-purple,
.deadline-mini-actions .compact-action,
.deadline-mini-actions .outline-purple {
  width: 100%;
  margin-top: 0;
}

.summary-icon.gold,
.summary-icon.purple,
.summary-icon.green,
.summary-icon.blue {
  background: #edf5fb;
  color: var(--lfn-navy);
}

.summary-cards {
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98)),
    #ffffff;
  box-shadow:
    0 12px 26px rgba(30, 44, 69, 0.055),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.summary-card > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.summary-icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-color: rgba(209, 219, 232, 0.86);
  border-radius: 10px;
  background: #edf5fb;
  color: var(--lfn-navy);
}

.summary-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.summary-card strong {
  font-size: clamp(1.35rem, 1.65vw, 1.7rem);
  line-height: 0.95;
}

.summary-card span {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.08;
}

.summary-card a {
  width: fit-content;
  margin-top: 2px;
  font-size: 0.82rem;
  text-decoration: none;
}

.summary-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #eef6fb;
  color: var(--lfn-navy);
}

.summary-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.summary-icon svg path,
.summary-icon svg circle,
.summary-icon svg line,
.summary-icon svg polyline,
.summary-icon svg rect {
  vector-effect: non-scaling-stroke;
}

.summary-icon .transaction-mark {
  width: 24px;
  height: 24px;
}

.document-mark {
  display: block;
  width: 25px;
  height: 25px;
  overflow: visible;
}

.document-mark path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.05;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.document-mark .document-mark-page {
  fill: #6ea8ff;
}

.broker-summary-cards {
  gap: 18px;
  margin-bottom: 24px;
}

.dashboard-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 18px;
  min-height: 124px;
  border: 1px solid #dce6f1;
  border-radius: 10px;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(7, 48, 79, 0.04), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:
    0 16px 34px rgba(26, 43, 68, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.dashboard-metric-card::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 96px;
  width: 1px;
  background: #dfe7f0;
}

.dashboard-metric-card .summary-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 13px;
  background: var(--metric-soft);
  color: var(--metric-color);
  box-shadow: none;
}

.dashboard-metric-card .summary-icon svg {
  display: block;
  width: 31px;
  height: 31px;
  stroke-width: 2.05;
}

.dashboard-metric-card .summary-icon .transaction-mark {
  width: 30px;
  height: 30px;
  transform: translate(1px, 1px);
}

.dashboard-metric-card .document-mark {
  width: 31px;
  height: 31px;
}

.dashboard-metric-card > div {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.dashboard-metric-card strong {
  overflow: hidden;
  color: var(--lfn-text);
  font-size: clamp(1.55rem, 1.8vw, 2.1rem);
  line-height: 0.95;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-metric-card span:not(.summary-icon) {
  color: var(--lfn-text);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.12;
}

.dashboard-metric-card a {
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-metric-card a::after {
  content: "→";
  display: grid;
  place-items: center;
  position: absolute;
  top: 50%;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--metric-soft);
  color: var(--metric-color);
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(7, 48, 79, 0.05);
  transform: translateY(-50%);
}

.dashboard-metric-card.metric-active {
  --metric-color: #256bd8;
  --metric-soft: #eaf2ff;
}

.dashboard-metric-card.metric-pending {
  --metric-color: #e88112;
  --metric-soft: #fff0df;
}

.dashboard-metric-card.metric-agents {
  --metric-color: #e88112;
  --metric-soft: #fff0df;
}

.dashboard-metric-card.metric-income {
  --metric-color: #0f9a76;
  --metric-soft: #dff8f0;
}

.dashboard-metric-card.metric-docs {
  --metric-color: #7242dd;
  --metric-soft: #f0e9ff;
}

.dashboard-metric-card .transaction-mark .transaction-mark-coin {
  fill: #7fb2ff;
}

@media (max-width: 1280px) {
  .dashboard-metric-card {
    grid-template-columns: 56px minmax(0, 1fr) 30px;
    gap: 14px;
    min-height: 118px;
    padding: 16px;
  }

  .dashboard-metric-card .summary-icon {
    width: 50px;
    height: 50px;
  }

  .dashboard-metric-card::before {
    left: 82px;
  }

  .dashboard-metric-card a::after {
    right: 16px;
    width: 30px;
    height: 30px;
  }
}

.transaction-summary-cards {
  gap: 18px;
  margin-bottom: 22px;
}

.transaction-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 34px;
  align-items: center;
  min-height: 124px;
  gap: 18px;
  border: 1px solid #d9e4ef;
  border-radius: 10px;
  padding: 18px 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(7, 48, 79, 0.045), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:
    0 16px 34px rgba(26, 43, 68, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.transaction-metric-card::before {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 96px;
  width: 1px;
  background: #dfe7f0;
}

.transaction-metric-card .summary-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 13px;
  box-shadow: none;
}

.transaction-metric-card .summary-icon svg {
  display: block;
  width: 31px;
  height: 31px;
  stroke-width: 2.05;
}

.transaction-metric-card .summary-icon .transaction-mark {
  width: 30px;
  height: 30px;
  transform: translate(1px, 1px);
}

.transaction-metric-card > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.transaction-metric-card strong {
  overflow: hidden;
  font-size: clamp(1.55rem, 1.8vw, 2.1rem);
  line-height: 0.95;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-metric-card span:not(.summary-icon) {
  color: var(--lfn-text);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.12;
}

.transaction-metric-card a {
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.transaction-metric-card a::after {
  content: "→";
  display: grid;
  place-items: center;
  position: absolute;
  top: 50%;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--metric-soft);
  color: var(--metric-color);
  font-size: 1.15rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(7, 48, 79, 0.05);
  transform: translateY(-50%);
}

.transaction-metric-card.metric-active {
  --metric-color: #256bd8;
  --metric-soft: #eaf2ff;
}

.transaction-metric-card.metric-pending {
  --metric-color: #e88112;
  --metric-soft: #fff0df;
}

.transaction-metric-card.metric-commission {
  --metric-color: #0f9a76;
  --metric-soft: #dff8f0;
}

.transaction-metric-card.metric-sold {
  --metric-color: #7242dd;
  --metric-soft: #f0e9ff;
}

.transaction-metric-card .summary-icon {
  background: var(--metric-soft);
  color: var(--metric-color);
}

.transaction-metric-card .transaction-mark .transaction-mark-coin {
  fill: #7fb2ff;
}

@media (max-width: 1280px) {
  .transaction-metric-card {
    grid-template-columns: 56px minmax(0, 1fr) 30px;
    gap: 14px;
    min-height: 118px;
    padding: 16px;
  }

  .transaction-metric-card .summary-icon {
    width: 50px;
    height: 50px;
  }

  .transaction-metric-card::before {
    left: 82px;
  }

  .transaction-metric-card a::after {
    right: 16px;
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 1180px) {
  .summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .summary-cards {
    grid-template-columns: 1fr;
  }

  .summary-card {
    min-height: 84px;
    padding: 14px 16px;
  }

  .summary-icon {
    width: 40px;
    height: 40px;
  }
}

.user-photo,
.agent-avatar,
.profile-photo {
  background: linear-gradient(135deg, #07304f, #0b4d78);
  color: #ffffff;
}

.alert-card > span,
.home-photo-upload span,
.modern-upload span {
  background: #edf5fb;
  color: var(--lfn-navy);
}

.home-photo-upload,
.modern-upload {
  border-color: #b9cce0;
  background: linear-gradient(180deg, #f8fbfd, #ffffff);
}

.scan-dropzone {
  border-color: #c8d6e5;
  background:
    linear-gradient(180deg, rgba(248, 251, 253, 0.88), rgba(255, 255, 255, 0.98)),
    #ffffff;
}

.modern-upload.is-dragging,
.home-photo-upload.is-dragging {
  border-color: var(--lfn-navy);
  background: linear-gradient(180deg, #eef6fb, #ffffff);
  box-shadow: 0 16px 34px rgba(7, 48, 79, 0.12);
  transform: translateY(-1px);
}

.agent-expiration.warn,
.agent-expiration.danger {
  border-color: #b9cce0;
  background: #edf5fb;
  color: var(--lfn-navy);
}

/* Brokerage listings manager */
.listings-summary-cards .dashboard-metric-card {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding-right: 16px;
}

.listings-summary-cards .dashboard-metric-card::before {
  left: 84px;
}

.listings-summary-cards .dashboard-metric-card a::after {
  display: none;
}

.listings-summary-cards .dashboard-metric-card strong {
  font-size: clamp(1.34rem, 1.35vw, 1.58rem);
  text-overflow: clip;
}

.listings-admin-grid {
  grid-template-columns: minmax(420px, 1fr) minmax(340px, 0.72fr);
  margin-bottom: 18px;
}

.listing-admin-form {
  gap: 18px;
}

.listing-form-card,
.listing-preview-card {
  overflow: hidden;
}

.listing-form-card > .card-header,
.listing-preview-card > .card-header {
  margin-bottom: 16px;
  border-bottom: 1px solid #edf1f6;
  padding-bottom: 14px;
}

.listing-photo-upload {
  min-height: 210px;
}

.listing-photo-controls {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #fbfdff, #f7fafc);
}

.listing-gallery-manager {
  display: grid;
  gap: 12px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.listing-gallery-manager h3 {
  margin: 0;
  color: var(--lfn-text);
  font-size: 0.92rem;
}

.listing-gallery-manager p {
  margin: 3px 0 0;
  color: var(--lfn-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.listing-gallery-upload {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 78px;
  border: 1.5px dashed #b9cce0;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--lfn-text);
  cursor: pointer;
}

.listing-gallery-upload.is-dragging {
  border-color: var(--lfn-navy);
  background: linear-gradient(180deg, #eef6fb, #ffffff);
  box-shadow: 0 16px 34px rgba(7, 48, 79, 0.12);
  transform: translateY(-1px);
}

.listing-gallery-upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.listing-gallery-upload span {
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-size: 1.35rem;
  font-weight: 900;
}

.listing-gallery-upload strong,
.listing-gallery-upload small {
  display: block;
  grid-column: 2;
  min-width: 0;
  text-transform: none;
}

.listing-gallery-upload strong {
  color: var(--lfn-text);
  font-size: 0.88rem;
  line-height: 1.2;
}

.listing-gallery-upload small {
  margin-top: 3px;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.listing-gallery-preview {
  display: grid;
  gap: 8px;
}

.listing-gallery-preview > p {
  margin: 0;
  border: 1px dashed #dfe6f0;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  color: var(--lfn-muted);
  font-size: 0.84rem;
}

.listing-gallery-preview > small {
  color: var(--lfn-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.listing-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px;
}

.listing-gallery-grid figure {
  position: relative;
  aspect-ratio: 1.22 / 1;
  overflow: hidden;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  margin: 0;
  background: #eef5fb;
  cursor: grab;
  user-select: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.listing-gallery-grid figure.is-pending {
  border-color: #c6a247;
}

.listing-gallery-grid figure.is-dragging {
  opacity: 0.58;
  transform: scale(0.98);
  cursor: grabbing;
}

.listing-gallery-grid figure.is-drop-target {
  border-color: var(--lfn-navy);
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.16);
}

.listing-gallery-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-gallery-grid button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 28, 45, 0.82);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}

.listing-gallery-position {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--lfn-text);
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(17, 28, 45, 0.12);
}

.listing-gallery-remove {
  position: absolute;
  top: 6px;
  right: 6px;
}

.listing-gallery-controls {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.listing-gallery-controls button {
  pointer-events: auto;
  background: rgba(17, 28, 45, 0.76);
  font-size: 1rem;
}

.listing-gallery-controls button:disabled {
  opacity: 0.36;
  cursor: default;
}

.listing-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.listing-copy-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.listing-short-link-field {
  grid-column: 1 / -1;
}

.listing-short-link-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.listing-short-link-control input {
  min-width: 0;
  color: var(--lfn-navy);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.listing-short-link-control button {
  min-height: 44px;
}

.listing-delete-action {
  border-color: #f0c0bd;
  color: #a33a34;
}

.listing-preview {
  --home-ink: #10273f;
  --home-blue: #1f5b84;
  --home-coral: #10273f;
  --home-cloud: #f6fafc;
  --home-line: #d9e8f0;
  --home-muted: #536f85;
  min-height: 420px;
}

.listing-preview .public-listing-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(16, 39, 63, 0.12);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 70%, #fbfdff 100%);
  box-shadow: 0 12px 30px rgba(16, 39, 63, 0.08);
}

.listing-preview .public-listing-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1.45 / 1;
  min-height: 210px;
  overflow: hidden;
  border-bottom: 1px solid var(--home-line);
  background:
    linear-gradient(135deg, rgba(16, 39, 63, 0.05), rgba(111, 164, 200, 0.18)),
    var(--home-cloud);
  color: var(--home-ink);
  font-size: 1.5rem;
  text-align: center;
}

.listing-preview .public-listing-media-link {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.listing-preview .public-listing-media > span,
.listing-preview .public-listing-media-link > span {
  display: grid;
  gap: 4px;
  padding: 16px;
}

.listing-preview .public-listing-media > span strong,
.listing-preview .public-listing-media-link > span strong {
  color: var(--home-ink);
}

.listing-preview .public-listing-media > span small,
.listing-preview .public-listing-media-link > span small {
  color: var(--home-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.listing-preview .public-listing-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-preview .public-listing-media em {
  position: absolute;
  top: 16px;
  left: 16px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(16, 39, 63, 0.9);
  color: #ffffff;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(16, 39, 63, 0.18);
}

.listing-preview .public-listing-media b {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: calc(100% - 32px);
  border-radius: 6px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--home-ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.listing-preview .public-listing-photo-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--home-ink);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-50%);
}

.listing-preview .public-listing-photo-nav.previous {
  left: 12px;
}

.listing-preview .public-listing-photo-nav.next {
  right: 12px;
}

.listing-preview .public-listing-photo-count {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(16, 39, 63, 0.82);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.listing-preview .public-listing-photo-strip {
  display: none;
}

.listing-preview .public-listing-photo-strip img,
.listing-preview .public-listing-photo-strip span {
  width: 100%;
  aspect-ratio: 1.2 / 1;
  border-radius: 6px;
}

.listing-preview .public-listing-photo-strip img {
  display: block;
  object-fit: cover;
}

.listing-preview .public-listing-photo-strip span {
  display: grid;
  place-items: center;
  border: 1px solid var(--home-line);
  background: #ffffff;
  color: var(--home-ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.listing-preview .public-listing-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.76rem;
  padding: clamp(1.05rem, 1.6vw, 1.24rem);
}

.listing-preview .public-listing-price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.listing-preview .public-listing-price-row strong {
  color: var(--home-ink);
  font-size: clamp(1.42rem, 1.9vw, 1.82rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.listing-preview .public-listing-price-row span {
  display: none;
}

.listing-preview .public-listing-status-pending .public-listing-media em,
.listing-preview .public-listing-status-pending .public-listing-price-row span {
  background: #92400e;
  color: #ffffff;
}

.listing-preview .public-listing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 0.18rem 0.75rem;
  align-items: center;
  width: max-content;
  max-width: 100%;
  border: 1px solid #d7e7ef;
  border-radius: 8px;
  padding: 0.48rem 0.64rem;
  background: linear-gradient(180deg, #f9fdff 0%, #f4f9fc 100%);
}

.listing-preview .public-listing-stats span {
  display: flex;
  align-items: baseline;
  gap: 0.28rem;
  min-width: 0;
  color: var(--home-ink);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.listing-preview .public-listing-stats span strong {
  color: var(--home-ink);
  font-size: 0.94rem;
  line-height: 1;
}

.listing-preview .public-listing-stats span small {
  color: var(--home-muted);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.listing-preview .public-listing-body h2 {
  margin: 0;
  color: var(--home-ink);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.14;
}

.listing-preview .public-listing-location {
  color: var(--home-coral);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.listing-preview .public-listing-address {
  margin: -0.35rem 0 0;
  color: var(--home-ink);
  font-size: 0.91rem;
  font-weight: 650;
  line-height: 1.45;
}

.listing-preview .public-listing-agent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 70px;
  gap: 0.64rem;
  align-items: center;
  border: 1px solid #d7e7ef;
  border-radius: 8px;
  padding: 0.62rem;
  background: linear-gradient(135deg, rgba(248, 252, 254, 0.98), rgba(255, 255, 255, 0.98));
}

.listing-preview .public-listing-agent-photo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #d7e7ef;
  border-radius: 50%;
  background: var(--home-cloud);
  color: var(--home-ink);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 20px rgba(16, 39, 63, 0.08);
}

.listing-preview .public-listing-agent-copy {
  display: grid;
  min-width: 0;
  gap: 0.1rem;
}

.listing-preview .public-listing-agent-copy > span {
  color: var(--home-coral);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.listing-preview .public-listing-agent-copy strong {
  min-width: 0;
  color: var(--home-ink);
  font-size: 1rem;
  line-height: 1.18;
}

.listing-preview .public-listing-agent-copy small {
  color: var(--home-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
}

.listing-preview .public-listing-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 0.6rem;
  align-items: stretch;
  margin-top: auto;
  border-top: 1px solid var(--home-line);
  padding-top: 0.95rem;
}

.listing-preview .public-listing-link,
.listing-preview .public-listing-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 4px;
  padding: 0.72rem 0.78rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.listing-preview .public-listing-link {
  border: 1px solid var(--home-line);
  background: #ffffff;
  color: var(--home-ink);
}

.listing-preview .public-listing-link.is-disabled {
  opacity: 0.62;
}

.listing-preview .public-listing-actions .btn-primary {
  border: 1px solid var(--home-ink);
  background: var(--home-ink);
  color: #ffffff;
  cursor: default;
  box-shadow: 0 10px 20px rgba(16, 39, 63, 0.14);
}

.listing-preview-card-inner {
  display: grid;
  gap: 16px;
}

.listing-preview-photo {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
  overflow: hidden;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 28, 45, 0.08), rgba(198, 162, 71, 0.18)),
    #eef5fb;
  color: var(--lfn-navy);
  font-size: 1.7rem;
  font-weight: 900;
}

.listing-preview-photo img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.listing-preview-photo em {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(17, 28, 45, 0.88);
  color: #ffffff;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.listing-preview-photo b {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--lfn-text);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.listing-preview-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.listing-preview-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 1.2 / 1;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  object-fit: cover;
}

.listing-preview-copy {
  display: grid;
  gap: 9px;
}

.listing-preview-copy > span {
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listing-preview-copy h3 {
  margin: 0;
  color: var(--lfn-text);
  font-size: 1.22rem;
  line-height: 1.2;
}

.listing-preview-copy strong {
  color: var(--lfn-navy);
  font-size: 1.3rem;
}

.listing-preview-copy p {
  color: var(--lfn-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.listing-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.listing-preview-stats span {
  display: grid;
  gap: 3px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcff;
  color: var(--lfn-text);
  font-size: 0.78rem;
  font-weight: 900;
}

.listing-preview-stats span strong {
  color: var(--lfn-text);
  font-size: 1.04rem;
  line-height: 1;
}

.listing-preview-stats span small,
.listing-preview-address {
  color: var(--lfn-muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.listing-preview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
}

.listing-preview-facts span {
  display: grid;
  gap: 4px;
  border-right: 1px solid #dfe6f0;
  border-bottom: 1px solid #dfe6f0;
  padding: 10px;
  background: #ffffff;
}

.listing-preview-facts span:nth-child(2n) {
  border-right: 0;
}

.listing-preview-facts span:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.listing-preview-facts small {
  color: var(--lfn-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.listing-preview-facts strong {
  color: var(--lfn-text);
  font-size: 0.88rem;
  line-height: 1.22;
}

.listing-preview-copy ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: var(--lfn-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.listing-preview-copy .purple-button {
  justify-self: start;
  margin-top: 4px;
}

.listings-inventory-card {
  margin: 0 0 18px;
}

.listing-inventory-header {
  align-items: center;
}

.listing-inventory-header p {
  margin: 4px 0 0;
  color: var(--lfn-muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.listing-primary-actions {
  justify-content: flex-end;
}

.listing-search-panel {
  margin-bottom: 12px;
}

.listing-search-panel .outline-purple {
  min-height: 38px;
}

.listing-editor-section {
  margin-top: 18px;
}

.listing-editor-section[hidden] {
  display: none;
}

.listing-filter-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.listing-filter-tabs button {
  min-height: 34px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.listing-filter-tabs button.active,
.listing-filter-tabs button:hover {
  border-color: var(--lfn-navy);
  background: #edf5fb;
  color: var(--lfn-navy);
}

.listing-inventory {
  display: grid;
  gap: 0;
}

.listings-inventory-card .modern-row {
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 0.62fr) minmax(0, 0.62fr) minmax(0, 0.72fr) minmax(0, 0.48fr) minmax(216px, 0.72fr);
}

.listing-inventory-head {
  padding: 0 12px;
}

.listing-inventory-row {
  min-height: 78px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  padding: 12px;
  background: #ffffff;
  color: var(--lfn-text);
  box-shadow: none;
}

.listing-inventory-row:hover {
  background: #fafcff;
}

.listing-property {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.listing-property > div {
  min-width: 0;
}

.listing-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 68px;
  height: 52px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 28, 45, 0.08), rgba(198, 162, 71, 0.18)),
    #eef5fb;
  color: var(--lfn-navy);
}

.listing-thumb::before {
  content: "▤";
  font-weight: 900;
}

.listing-thumb.has-photo::before {
  content: "";
}

.listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-property strong,
.listing-property small,
.listing-property em,
.listing-property b {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-property strong {
  color: var(--lfn-text);
  font-size: 0.94rem;
  line-height: 1.24;
}

.listing-property small,
.listing-property em,
.listing-property b {
  color: var(--lfn-muted);
  font-size: 0.78rem;
  line-height: 1.32;
  font-style: normal;
}

.listing-property b {
  margin-top: 2px;
  color: var(--lfn-navy);
  font-size: 0.74rem;
  font-weight: 900;
}

.listing-inventory-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--lfn-muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lfn-text) !important;
}

.listing-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.lfn-dashboard .listing-row-actions .compact-action {
  min-width: 58px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.listing-public-toggle {
  border-color: #b9cce0;
  background: #edf5fb;
}

@media (max-width: 1180px) {
  .listings-admin-grid,
  .listing-photo-controls,
  .listing-form-grid,
  .listing-copy-grid {
    grid-template-columns: 1fr;
  }

  .listing-primary-actions {
    justify-content: stretch;
    width: 100%;
  }
}

@media (max-width: 820px) {
  .lfn-dashboard .listing-topbar-actions > .purple-button,
  .lfn-dashboard .listing-topbar-actions > .outline-purple,
  .lfn-dashboard .listing-topbar-actions > .top-link,
  .lfn-dashboard .listing-topbar-actions > button,
  .lfn-dashboard .listing-topbar-actions > a {
    flex: 0 0 auto !important;
    width: 100%;
  }

  .listing-inventory-header {
    align-items: stretch;
  }

  .listing-filter-tabs {
    justify-content: flex-start;
  }

  .listing-inventory-head {
    display: none;
  }

  .listings-inventory-card .modern-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .listing-gallery-grid,
  .listing-preview-gallery,
  .listing-preview .public-listing-photo-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-preview-stats,
  .listing-preview-facts,
  .listing-preview .public-listing-actions {
    grid-template-columns: 1fr;
  }

  .listing-preview .public-listing-stats {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .listing-preview-facts span,
  .listing-preview-facts span:nth-child(2n),
  .listing-preview-facts span:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid #dfe6f0;
  }

  .listing-preview-facts span:last-child {
    border-bottom: 0;
  }

  .listing-property {
    align-items: flex-start;
  }

  .listing-inventory-row .compact-action {
    justify-self: start;
  }

  .listing-row-actions {
    justify-content: flex-start;
  }
}

.deadline-alerts {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 12px;
}

.deadline-alerts .alert-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
  min-height: 108px;
  padding: 12px 14px;
}

.deadline-alerts .alert-card > span {
  width: 48px;
  min-height: 50px;
}

.deadline-alerts .alert-card-copy {
  min-width: 0;
  min-height: 0;
}

.deadline-alerts .alert-card strong {
  overflow: hidden;
  font-size: 0.96rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-alerts .alert-card small {
  display: block;
  min-width: 0;
  font-size: 0.82rem;
  line-height: 1.24;
}

.deadline-alerts .alert-date-tile {
  display: inline-grid;
  grid-template-rows: 17px 31px;
  place-items: center;
  width: 48px;
  min-height: 50px;
  overflow: hidden;
  border: 1px solid #d4e0ec;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 38%, #f8fbfd 39%, #f8fbfd 100%);
  color: var(--lfn-navy);
  font-weight: 900;
  box-shadow:
    inset 0 17px 0 #edf5fb,
    0 8px 18px rgba(7, 48, 79, 0.06);
}

.deadline-alerts .alert-date-tile i,
.deadline-alerts .alert-date-tile em {
  display: block;
  font-style: normal;
  line-height: 1;
}

.deadline-alerts .alert-date-tile i {
  width: 100%;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  line-height: 17px;
  text-align: center;
  text-transform: uppercase;
}

.deadline-alerts .alert-date-tile em {
  font-size: 1.18rem;
  line-height: 31px;
}

.deadline-alerts .alert-card.urgent .alert-date-tile {
  border-color: #f0c7c7;
  color: #c43131;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 38%, #fffafa 39%, #fffafa 100%);
  box-shadow:
    inset 0 17px 0 #fff0f0,
    0 8px 18px rgba(196, 49, 49, 0.06);
}

.deadline-alerts .alert-card.warning .alert-date-tile {
  border-color: #efd8b9;
  color: #ad7518;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 38%, #fffaf3 39%, #fffaf3 100%);
  box-shadow:
    inset 0 17px 0 #fff1dd,
    0 8px 18px rgba(173, 117, 24, 0.06);
}

.deadline-alerts .alert-card-actions {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-self: center;
  margin-top: 0;
}

.deadline-alerts .alert-card-actions .compact-action,
.deadline-alerts .alert-card-actions .outline-purple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 34px;
  margin-top: 0;
  padding: 0 12px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .deadline-alerts {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 820px) {
  .deadline-alerts {
    grid-template-columns: 1fr;
  }

  .deadline-alerts .alert-card-actions {
    grid-column: 1 / -1;
    grid-row: auto;
    grid-template-columns: 1fr 0.55fr;
  }
}

/* Broker dashboard header polish */
.lfn-dashboard .lfn-topbar {
  position: relative;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
  padding: 2px 0 24px;
  border-bottom: 1px solid rgba(211, 221, 236, 0.9);
}

.lfn-dashboard .lfn-topbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--lfn-gold), rgba(198, 162, 71, 0));
}

.lfn-dashboard .lfn-topbar h1 {
  color: #0f1f35;
  font-size: clamp(1.85rem, 2.35vw, 2.45rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.05;
}

.lfn-dashboard .lfn-topbar p {
  margin-top: 8px;
  color: #64748b;
  font-size: 1rem;
  font-weight: 650;
}

.lfn-dashboard .topbar-actions {
  gap: 12px;
  align-self: center;
}

.lfn-dashboard .bell-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(211, 221, 236, 0.95);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 253, 0.96));
  color: transparent;
  font-size: 0;
  box-shadow:
    0 14px 28px rgba(15, 31, 53, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lfn-dashboard .bell-button::before {
  content: "";
  width: 20px;
  height: 20px;
  background: #0f2a45;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v8A2.5 2.5 0 0 1 17.5 17H8.3l-3.2 2.6A.68.68 0 0 1 4 19.07V6.5Zm2.5-.85c-.47 0-.85.38-.85.85v10.8l1.86-1.5c.13-.1.28-.15.44-.15h9.55c.47 0 .85-.38.85-.85v-8c0-.47-.38-.85-.85-.85h-11Zm1.2 3.05c0-.39.31-.7.7-.7h7.2a.7.7 0 0 1 0 1.4H8.4a.7.7 0 0 1-.7-.7Zm0 3.3c0-.39.31-.7.7-.7h5.35a.7.7 0 0 1 0 1.4H8.4a.7.7 0 0 1-.7-.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v8A2.5 2.5 0 0 1 17.5 17H8.3l-3.2 2.6A.68.68 0 0 1 4 19.07V6.5Zm2.5-.85c-.47 0-.85.38-.85.85v10.8l1.86-1.5c.13-.1.28-.15.44-.15h9.55c.47 0 .85-.38.85-.85v-8c0-.47-.38-.85-.85-.85h-11Zm1.2 3.05c0-.39.31-.7.7-.7h7.2a.7.7 0 0 1 0 1.4H8.4a.7.7 0 0 1-.7-.7Zm0 3.3c0-.39.31-.7.7-.7h5.35a.7.7 0 0 1 0 1.4H8.4a.7.7 0 0 1-.7-.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lfn-dashboard .bell-button:hover,
.lfn-dashboard .bell-button:focus {
  border-color: rgba(198, 162, 71, 0.65);
  background: #ffffff;
  box-shadow:
    0 18px 34px rgba(15, 31, 53, 0.12),
    0 0 0 4px rgba(198, 162, 71, 0.1);
  transform: translateY(-1px);
}

.lfn-dashboard .bell-button span {
  top: -7px;
  right: -7px;
  width: 21px;
  height: 21px;
  border: 2px solid #ffffff;
  background: #dc3434;
  box-shadow: 0 8px 14px rgba(220, 52, 52, 0.25);
  color: #ffffff;
  font-size: 0.68rem;
}

.lfn-dashboard .user-menu {
  position: relative;
  gap: 12px;
  min-height: 60px;
  margin-left: 0;
  padding: 6px 8px 6px 6px;
  border: 1px solid rgba(211, 221, 236, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 16px 36px rgba(15, 31, 53, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lfn-dashboard .user-menu > div {
  min-width: 118px;
  gap: 3px;
}

.lfn-dashboard .user-menu strong {
  color: #10223a;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.lfn-dashboard .user-menu small {
  color: #6b778c;
  font-size: 0.8rem;
  font-weight: 800;
}

.lfn-dashboard .user-menu a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  border-radius: 10px;
  padding: 0 10px;
  background: #f4f7fb;
  color: #0f2a45;
  font-size: 0.78rem;
  text-decoration: none;
}

.lfn-dashboard .user-menu a:hover,
.lfn-dashboard .user-menu a:focus {
  background: #0f2a45;
  color: #ffffff;
}

.lfn-dashboard .user-photo {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 3px solid #ffffff;
  background: linear-gradient(135deg, #0b3151, #0d5b87);
  box-shadow: 0 12px 24px rgba(15, 31, 53, 0.16);
  font-size: 0.92rem;
}

.lfn-dashboard .user-photo.has-image {
  background: #ffffff;
  color: transparent;
}

.lfn-dashboard .user-photo.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
  image-rendering: auto;
  transform: scale(1.04);
}

@media (max-width: 760px) {
  .lfn-dashboard .lfn-topbar {
    align-items: flex-start;
  }

  .lfn-dashboard .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .lfn-dashboard .user-menu {
    flex: 1 1 260px;
  }
}

/* Messages polish pass */
.messages-page .lfn-topbar {
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.simple-messages-layout {
  grid-template-columns: minmax(270px, 300px) minmax(0, 1fr);
  gap: 16px;
  max-width: 1100px;
}

.inbox-list-card,
.simple-compose-card {
  padding: 16px 18px;
}

.inbox-list-card .card-header {
  margin-bottom: 14px;
}

.message-count-pill {
  min-height: 28px;
  padding: 0 11px;
  font-size: 0.76rem;
}

.message-empty-state {
  min-height: 124px;
  gap: 7px;
  padding: 16px;
}

.message-empty-state span {
  width: 40px;
  height: 40px;
  font-size: 1rem;
}

.message-empty-state strong {
  font-size: 0.96rem;
}

.message-empty-state p {
  max-width: 260px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.simple-conversation-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 10px;
  padding-bottom: 12px;
}

.simple-conversation-header h2 {
  font-size: clamp(1.28rem, 1.55vw, 1.58rem);
}

.conversation-header p {
  margin-top: 4px;
  font-size: 0.88rem;
  line-height: 1.35;
}

.message-header-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 8px;
  min-width: 208px;
}

.message-header-actions .outline-purple {
  width: auto;
  min-height: 34px;
  margin-top: 0;
  border-color: #d4dfeb;
  background: #ffffff;
  box-shadow: none;
  color: #6d7c8f;
  font-size: 0.8rem;
}

.message-header-actions .message-danger-action:not(:disabled) {
  border-color: #edc4c4;
  color: #a73c3c;
}

.message-header-actions button:disabled {
  opacity: 0.52;
}

.compact-message-thread {
  min-height: 154px;
  gap: 10px;
  padding: 10px 12px;
  background:
    linear-gradient(180deg, rgba(251, 253, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.compact-message-thread .message-empty-state {
  min-height: 132px;
}

.message-bubble {
  gap: 5px;
  padding: 12px;
}

.message-bubble p {
  line-height: 1.38;
}

.simple-compose-card .reply-box {
  gap: 7px;
  margin-top: 10px;
}

.simple-message-form label {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--lfn-muted);
}

.simple-message-form label > span {
  color: #5c6a7e;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.simple-message-form .message-body-field {
  align-items: start;
}

.simple-message-form .message-body-field > span {
  padding-top: 11px;
}

.simple-message-form input,
.simple-message-form select,
.simple-message-form textarea {
  min-height: 38px;
  border-color: #d4dfeb;
  background: #ffffff;
  font-size: 0.92rem;
}

.simple-message-form textarea {
  min-height: 118px;
  padding: 12px;
}

.simple-compose-card .reply-box > div {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}

.simple-message-form .form-note {
  min-height: 20px;
  font-size: 0.84rem;
}

.icon-action-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  border-radius: 8px;
}

@media (max-width: 820px) {
  .simple-messages-layout {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .simple-conversation-header {
    grid-template-columns: 1fr;
  }

  .message-header-actions {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .inbox-list-card,
  .simple-compose-card {
    padding: 16px;
  }

  .simple-message-form label {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .simple-message-form .message-body-field > span {
    padding-top: 0;
  }

  .simple-compose-card .reply-box > div {
    align-items: stretch;
    flex-direction: column;
  }

  .icon-action-button {
    width: 100%;
  }
}

/* Messages refinement pass */
.messages-page {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(246, 250, 254, 0.9));
}

.messages-page .lfn-topbar {
  margin-bottom: 22px;
  border-bottom-color: #cad8e7;
}

.messages-page .lfn-topbar h1 {
  font-size: clamp(1.85rem, 2.5vw, 2.45rem);
  letter-spacing: 0;
}

.simple-messages-layout {
  grid-template-columns: minmax(300px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 1180px;
}

.inbox-list-card,
.simple-compose-card {
  border-color: #d4e0ec;
  box-shadow: 0 18px 44px rgba(17, 28, 45, 0.08);
}

.inbox-list-card {
  padding: 18px;
}

.simple-compose-card {
  padding: 18px;
}

.inbox-list-card .card-header {
  align-items: center;
  margin-bottom: 14px;
}

.inbox-list-card .card-header h2 {
  font-size: 1rem;
}

.message-count-pill {
  min-width: 88px;
  justify-content: center;
  background: #edf5fb;
}

.inbox-list {
  gap: 10px;
}

.inbox-list button.message-list-item {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  min-height: 118px;
  padding: 14px 13px;
  border-color: #d3dfeb;
  background: #fbfdff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.inbox-list button.message-list-item.active,
.inbox-list button.message-list-item:hover {
  border-color: #9fb8d2;
  background: #f7fbff;
  box-shadow: 0 10px 24px rgba(17, 28, 45, 0.08);
}

.message-list-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.message-list-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.message-list-topline strong {
  overflow: hidden;
  color: var(--lfn-text);
  font-size: 1rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list-topline time {
  color: #607188;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.message-meta-line {
  min-width: 0;
  color: #53657a;
  font-size: 0.83rem;
  line-height: 1.25;
}

.message-meta-line span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-preview-text {
  color: #6b7b90;
  font-size: 0.86rem;
  line-height: 1.35;
}

.message-avatar {
  width: 46px;
  height: 46px;
  background: #073f66;
  box-shadow: 0 8px 18px rgba(7, 63, 102, 0.18);
}

.system-alert-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid #dce6ef;
  padding-bottom: 16px;
}

.system-alert-list[hidden] {
  display: none;
}

.system-alert-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #5d7086;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-alert-heading strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #e7f4ef;
  color: #206347;
  font-size: 0.78rem;
}

.system-alert-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 108px;
  border: 1px solid #cfe0d9;
  border-radius: 8px;
  padding: 13px;
  background: #fbfefc;
  color: var(--lfn-text);
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.system-alert-item.active,
.system-alert-item:hover {
  border-color: #88b8a5;
  background: #f4fbf8;
  box-shadow: 0 10px 24px rgba(23, 93, 68, 0.09);
}

.system-alert-item.unread {
  border-color: #73af98;
}

.message-avatar.system {
  background: #dff3eb;
  color: #1f6c4d;
  box-shadow: 0 8px 18px rgba(31, 108, 77, 0.13);
}

.system-alert-bubble {
  border: 1px solid #cfe0d9;
  background: #f7fcfa;
}

.alert-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.alert-detail-actions .compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.simple-conversation-header {
  gap: 18px;
  margin-bottom: 10px;
  padding-bottom: 14px;
}

.simple-conversation-header h2 {
  font-size: 1.34rem;
}

.conversation-header p {
  color: #5b6d84;
  font-size: 0.9rem;
}

.message-header-actions {
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  min-width: 200px;
}

.message-header-actions .outline-purple {
  border-color: #cfdce8;
  color: #5c6e84;
  font-weight: 800;
}

.message-header-actions .outline-purple:hover:not(:disabled) {
  border-color: #8ba6c2;
  background: #f7fbff;
  color: #18324d;
}

.message-header-actions .message-danger-action:not(:disabled) {
  border-color: #efc8c8;
  color: #9e3333;
}

.message-header-actions .message-danger-action:hover:not(:disabled) {
  border-color: #d99191;
  background: #fff7f7;
}

.compact-message-thread {
  min-height: 150px;
  padding: 12px;
  border-color: #d7e2ee;
  background:
    linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.message-bubble {
  max-width: min(78%, 360px);
  border-radius: 8px;
  padding: 12px 13px;
  box-shadow: 0 10px 22px rgba(17, 28, 45, 0.08);
}

.message-bubble.outgoing {
  background: #073f66;
}

.message-bubble p {
  font-size: 0.94rem;
}

.simple-compose-card .reply-box {
  gap: 8px;
  margin-top: 12px;
}

.simple-message-form label {
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
}

.simple-message-form input,
.simple-message-form select,
.simple-message-form textarea {
  border-color: #cfdce8;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(17, 28, 45, 0.03);
  color: #122037;
}

.simple-message-form input:focus,
.simple-message-form select:focus,
.simple-message-form textarea:focus {
  border-color: #8ba6c2;
  box-shadow:
    0 0 0 3px rgba(7, 63, 102, 0.1),
    inset 0 1px 0 rgba(17, 28, 45, 0.03);
}

.simple-message-form textarea {
  min-height: 118px;
  resize: vertical;
}

.simple-compose-card .reply-box > div {
  margin-top: 2px;
  padding-top: 10px;
}

.simple-message-form .form-note.success {
  color: #24734f;
}

.simple-message-form .icon-action-button {
  background: #073f66;
  box-shadow: 0 14px 28px rgba(7, 63, 102, 0.18);
}

.simple-message-form .icon-action-button:hover {
  background: #0a527e;
}

@media (max-width: 980px) {
  .simple-messages-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .message-list-topline {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .message-list-topline time {
    white-space: normal;
  }

  .inbox-list button.message-list-item {
    min-height: 104px;
  }
}

/* Responsive QA fixes */
.settings-page-grid {
  grid-template-columns: minmax(0, 1fr);
}

.modern-upload input[type="file"],
.home-photo-upload input[type="file"],
.agent-headshot-picker input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.agent-page-form > label input[type="file"] {
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
}

@media (min-width: 821px) {
  .settings-page-grid .agent-roster-head,
  .settings-page-grid .agent-roster-row {
    grid-template-columns:
      minmax(220px, 1.35fr)
      minmax(180px, 1fr)
      minmax(110px, 0.5fr)
      minmax(96px, 0.42fr)
      minmax(82px, 0.34fr);
  }

  .transaction-detail-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .transaction-detail-topbar .transaction-topbar-title {
    flex: 1 1 280px;
    max-width: none;
    min-width: 0;
  }

  .transaction-detail-topbar .transaction-topbar-actions {
    flex: 1 1 520px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }

  .transaction-detail-topbar .transaction-action-buttons {
    flex: 1 1 360px;
    flex-wrap: wrap;
    min-width: 0;
    border-right: 0;
    padding-right: 0;
  }

  .transaction-detail-topbar .transaction-action-buttons .purple-button {
    min-width: 150px;
  }
}

@media (max-width: 820px) {
  .transaction-detail-topbar h1 {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

/* Backend consistency polish */
.lfn-dashboard {
  grid-template-columns: minmax(248px, 274px) minmax(0, 1fr);
}

.lfn-main {
  width: 100%;
  min-width: 0;
}

.lfn-nav a {
  min-width: 0;
  text-decoration: none;
  line-height: 1.15;
}

.lfn-nav a span {
  flex: 0 0 28px;
}

.lfn-dashboard .lfn-topbar > div:first-child {
  min-width: 0;
  max-width: 880px;
}

.lfn-dashboard .lfn-topbar p {
  max-width: 780px;
}

.lfn-dashboard .topbar-actions {
  min-width: 0;
  flex-wrap: wrap;
}

.lfn-dashboard .topbar-actions > .purple-button,
.lfn-dashboard .topbar-actions > .outline-purple,
.lfn-dashboard .topbar-actions > .top-link,
.lfn-dashboard .topbar-actions > button,
.lfn-dashboard .topbar-actions > a {
  flex: 0 0 auto;
}

.lfn-dashboard .compact-action,
.lfn-dashboard .top-link,
.lfn-dashboard .mini-action,
.lfn-dashboard .message-header-actions button,
.lfn-dashboard .calendar-filter-controls select,
.lfn-dashboard .tax-year-control select {
  min-height: 42px;
  border-radius: 8px;
}

.lfn-dashboard .user-menu {
  max-width: min(100%, 360px);
}

.lfn-dashboard .user-menu > div {
  min-width: 0;
}

.lfn-dashboard .user-menu strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lfn-dashboard .white-card,
.lfn-dashboard .summary-card,
.lfn-dashboard .alert-card {
  min-width: 0;
}

.lfn-dashboard .card-header {
  gap: 12px;
}

.lfn-dashboard .card-header h2,
.lfn-dashboard .card-header h3,
.lfn-dashboard .summary-card > div,
.lfn-dashboard .property-cell,
.lfn-dashboard .deadline-mini-copy,
.lfn-dashboard .alert-card-copy {
  min-width: 0;
}

.lfn-dashboard .summary-card a,
.lfn-dashboard .card-header a {
  width: fit-content;
}

.lfn-dashboard .dashboard-metric-card {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 50px 16px 16px;
}

.lfn-dashboard .dashboard-metric-card::before {
  left: 82px;
}

.lfn-dashboard .dashboard-metric-card .summary-icon {
  width: 50px;
  height: 50px;
}

.lfn-dashboard .dashboard-metric-card strong,
.lfn-dashboard .dashboard-metric-card span:not(.summary-icon),
.lfn-dashboard .dashboard-metric-card a {
  min-width: 0;
}

.lfn-dashboard .dashboard-metric-card span:not(.summary-icon) {
  overflow: visible;
  line-height: 1.18;
  white-space: normal;
}

.lfn-dashboard .dashboard-metric-card a::after {
  right: 14px;
}

.lfn-dashboard input,
.lfn-dashboard select,
.lfn-dashboard textarea,
.lfn-dashboard button {
  font: inherit;
}

.lfn-dashboard select:disabled,
.lfn-dashboard input:disabled,
.lfn-dashboard textarea:disabled {
  cursor: not-allowed;
  background: #eef4f9;
  color: #52657a;
}

.calendar-filter-controls,
.message-header-actions,
.transaction-action-buttons {
  min-width: 0;
}

.simple-messages-layout,
.calendar-layout,
.dashboard-grid {
  min-width: 0;
}

@media (max-width: 1180px) {
  .summary-cards,
  .deadline-alerts {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .transaction-entry-topbar,
  .transaction-detail-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .transaction-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .lfn-dashboard {
    display: block;
  }

  .lfn-sidebar {
    position: relative;
    height: auto;
    max-height: none;
    padding: 18px 16px;
  }

  .lfn-logo {
    justify-content: flex-start;
    min-height: 58px;
    padding-bottom: 10px;
  }

  .lfn-logo img {
    max-width: 184px;
  }

  .lfn-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lfn-nav a {
    min-height: 42px;
    padding: 0 10px;
    font-size: 0.86rem;
  }

  .lfn-main {
    padding: 22px 16px 28px;
  }

  .lfn-dashboard .lfn-topbar {
    gap: 16px;
    margin-bottom: 24px;
  }

  .lfn-dashboard .topbar-actions,
  .transaction-topbar-actions,
  .transaction-action-buttons {
    width: 100%;
    justify-content: flex-start;
  }

  .transaction-action-buttons {
    border-right: 0;
    padding-right: 0;
  }

  .lfn-dashboard .topbar-actions > .purple-button,
  .lfn-dashboard .topbar-actions > .outline-purple,
  .lfn-dashboard .topbar-actions > .top-link,
  .lfn-dashboard .topbar-actions > button,
  .lfn-dashboard .topbar-actions > a {
    flex: 0 0 auto;
    width: 100%;
  }

  .lfn-dashboard .bell-button {
    flex: 0 0 48px;
    width: 48px;
  }

  .lfn-dashboard .user-menu {
    flex: 1 1 100%;
  }

  .summary-cards,
  .deadline-alerts {
    grid-template-columns: 1fr;
  }

  .simple-messages-layout,
  .calendar-layout {
    grid-template-columns: 1fr;
  }
}

.client-access-page {
  --lfn-navy: #111c2d;
  --lfn-text: #111827;
  --lfn-muted: #59667c;
  --lfn-line: #e6eaf2;
  background:
    radial-gradient(circle at top left, rgba(198, 162, 71, 0.16), transparent 28rem),
    linear-gradient(135deg, #f7f9fc, #eef3f8);
}

.client-access-shell {
  display: grid;
  gap: 18px;
  width: min(100%, 480px);
}

.client-access-brand {
  display: flex;
  justify-content: center;
}

.client-auth-logo {
  display: inline-flex;
  justify-content: center;
}

.client-auth-logo img {
  display: block;
  width: clamp(190px, 58vw, 260px);
  height: auto;
  filter: drop-shadow(0 16px 28px rgba(17, 28, 45, 0.16));
}

.client-access-card {
  width: 100%;
  padding: clamp(24px, 5vw, 34px);
}

.client-access-card .auth-heading {
  text-align: left;
}

.client-access-card .auth-heading h1 {
  margin: 0;
  color: var(--lfn-text);
  font-size: clamp(1.8rem, 6vw, 2.45rem);
  line-height: 1.04;
}

.client-access-card .auth-heading p:last-child {
  color: var(--lfn-muted);
  line-height: 1.5;
}

.client-access-card .purple-button {
  width: 100%;
  min-height: 48px;
}

.client-access-reset-button {
  justify-self: start;
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--lfn-navy);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.client-access-reset-button:hover,
.client-access-reset-button:focus {
  color: var(--green);
}

.client-access-reset-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.client-access-help {
  display: grid;
  gap: 4px;
  border: 1px solid var(--lfn-line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfcff;
  color: var(--lfn-muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
}

.client-access-help strong {
  color: var(--lfn-text);
}

@media (max-width: 560px) {
  .client-access-page {
    padding: 18px;
  }

  .client-access-card .auth-heading {
    text-align: center;
  }

  .client-access-reset-button {
    justify-self: center;
  }
}

.client-portal-grid {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
}

.client-property-card {
  grid-row: span 4;
}

.client-overview-card,
.client-signature-task-card,
.client-timeline-card,
.client-contact-card,
.client-document-card {
  grid-column: 2;
}

.client-history-card {
  grid-column: 1 / -1;
}

.client-property-list,
.client-overview-panel,
.client-signature-task-list,
.client-timeline-list,
.client-contact-list,
.client-history-list {
  display: grid;
  gap: 10px;
}

.client-property-filter {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 13px 14px;
  background: #ffffff;
  color: var(--lfn-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.client-property-filter:hover,
.client-property-filter.active {
  border-color: rgba(7, 48, 79, 0.32);
  background: #f7fbff;
}

.client-property-filter span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf4ff;
  color: var(--lfn-navy);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.client-property-filter strong,
.client-property-filter small {
  display: block;
}

.client-property-filter small {
  color: var(--lfn-muted);
  font-weight: 800;
  line-height: 1.35;
}

.client-overview-panel {
  gap: 12px;
}

.client-overview-hero {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, #f8fbfd, #ffffff);
}

.client-overview-hero span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #edf4ff;
  color: var(--lfn-navy);
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.client-overview-hero strong,
.client-overview-hero small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-overview-hero strong {
  color: var(--lfn-text);
  font-size: 1.08rem;
  line-height: 1.15;
}

.client-overview-hero small {
  color: var(--lfn-muted);
  font-weight: 800;
}

.client-overview-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.client-overview-facts article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #e3ebf3;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.client-overview-facts span,
.client-timeline-item em,
.client-contact-row > span {
  color: var(--lfn-muted);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.client-overview-facts strong {
  min-width: 0;
  overflow: hidden;
  color: var(--lfn-text);
  font-size: 0.84rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

.client-signature-task-list {
  gap: 9px;
}

.client-signature-task {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 13px 14px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.client-signature-task-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.client-signature-task-copy span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff4e5;
  color: #a76617;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.client-signature-task-copy strong,
.client-signature-task-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-signature-task-copy strong {
  color: var(--lfn-text);
  font-size: 0.98rem;
  line-height: 1.2;
}

.client-signature-task-copy small {
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.client-signature-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.client-signature-task-actions .compact-action {
  min-width: 92px;
  min-height: 36px;
}

.client-timeline-list {
  gap: 8px;
}

.client-timeline-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) 104px 82px;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
}

.client-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--lfn-navy);
  box-shadow: 0 0 0 4px #edf4ff;
}

.client-timeline-dot.attention {
  background: #a76617;
  box-shadow: 0 0 0 4px #fff4e5;
}

.client-timeline-dot.complete {
  background: #1f7a4f;
  box-shadow: 0 0 0 4px #edf7f1;
}

.client-timeline-dot.closing {
  background: #5b4b94;
  box-shadow: 0 0 0 4px #f0edfb;
}

.client-timeline-item strong,
.client-timeline-item small,
.client-contact-row strong,
.client-contact-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-timeline-item strong,
.client-contact-row strong {
  color: var(--lfn-text);
  font-size: 0.86rem;
  line-height: 1.2;
}

.client-timeline-item small,
.client-contact-row small {
  margin-top: 3px;
  color: var(--lfn-muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.client-timeline-item time {
  color: var(--lfn-navy);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: right;
}

.client-timeline-item em {
  justify-self: end;
  border-radius: 999px;
  padding: 5px 8px;
  background: #edf4ff;
  color: var(--lfn-navy);
  font-style: normal;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.client-timeline-item em.is-past {
  background: #f4f6f8;
  color: #7b8794;
}

.client-timeline-item em.is-soon {
  background: #fff4e5;
  color: #a76617;
}

.client-timeline-item em.is-complete {
  background: #edf7f1;
  color: #1f7a4f;
}

.client-contact-list {
  gap: 8px;
}

.client-contact-row {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 11px 12px;
  background: #ffffff;
}

.client-contact-row > span {
  color: var(--lfn-navy);
}

.client-contact-row .compact-action {
  min-width: 72px;
  min-height: 32px;
  margin-top: 0;
}

.client-document-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbe5ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(7, 48, 79, 0.06);
}

.client-document-list .document-list-head,
.client-document-list article {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(180px, 0.34fr) minmax(240px, 0.4fr);
  gap: 16px;
  align-items: center;
}

.client-document-list .document-list-head {
  min-height: 48px;
  padding: 0 22px;
  background: linear-gradient(180deg, #fbfdff, #f5f9fd);
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-document-list article {
  min-height: 92px;
  border: 0;
  border-top: 1px solid #edf1f6;
  border-radius: 0;
  padding: 16px 22px;
}

.client-document-status {
  grid-column: 2;
}

.review-status-badge.needs-action {
  background: #fff4e5;
  color: #a76617;
}

.client-document-actions {
  grid-template-columns: repeat(3, minmax(82px, auto));
  gap: 8px;
  width: 100%;
}

.client-document-actions .compact-action {
  width: auto;
  min-width: 82px;
  min-height: 36px;
}

.client-history-list article {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px 14px;
  background: #ffffff;
}

.client-history-list article > span {
  color: var(--lfn-navy);
  font-weight: 900;
}

.client-history-list strong,
.client-history-list small {
  display: block;
}

.client-history-list small {
  margin-top: 3px;
  color: var(--lfn-muted);
  font-weight: 800;
}

.client-portal-admin-section {
  background: #fbfcff;
}

.client-portal-status {
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--lfn-muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.4;
  text-transform: none;
}

.client-portal-status.success {
  border-color: #bfe3cf;
  background: #f0faf4;
  color: #1f7a4f;
}

.client-portal-status.error {
  border-color: #f0b6b6;
  background: #fff5f5;
  color: #b43636;
}

.client-portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.transaction-doc-view-controls {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
}

.transaction-doc-view-controls .compact-action {
  min-width: 70px;
  min-height: 32px;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.transaction-doc-view-controls .compact-action.active {
  border-color: var(--lfn-navy, var(--blue));
  background: var(--lfn-navy, var(--blue));
  color: #ffffff;
}

#transactionDocumentList .document-list-head,
#transactionDocumentList article {
  grid-template-columns: minmax(340px, 1.05fr) minmax(280px, 0.55fr) minmax(260px, 0.38fr);
}

#transactionDocumentList.transaction-document-list-view article {
  grid-template-columns: minmax(0, 1fr) minmax(224px, auto);
  gap: 18px;
}

#transactionDocumentList.transaction-document-list-view article {
  min-height: 94px;
  padding: 16px;
}

#transactionDocumentList.transaction-document-list-view article:first-child {
  border-top: 0;
}

#transactionDocumentList.transaction-document-list-view .document-main {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

#transactionDocumentList.transaction-document-list-view .document-file-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #edf6fd;
}

#transactionDocumentList.transaction-document-list-view .document-file-copy {
  display: grid;
  gap: 5px;
}

#transactionDocumentList.transaction-document-list-view .document-main strong {
  max-width: 100%;
  font-size: 0.96rem;
  line-height: 1.15;
}

#transactionDocumentList.transaction-document-list-view .document-main small {
  margin-top: 0;
  font-size: 0.79rem;
  line-height: 1.2;
}

.document-status-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
  min-width: 0;
}

.document-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  padding: 0 9px;
  background: #f7fafc;
  color: var(--lfn-text, var(--ink));
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
}

.document-pill.is-visible,
.document-pill.is-signed {
  border-color: #bee3cf;
  background: #edf7f1;
  color: #1f7a4f;
}

.document-pill.is-hidden,
.document-pill.is-not_required {
  color: var(--lfn-muted, var(--muted));
}

.document-pill.is-needs_signature,
.document-pill.is-sent {
  border-color: #d8c7ef;
  background: #f6f0ff;
  color: #6c3fb3;
}

.document-pill.is-declined,
.document-pill.is-voided {
  border-color: #f0b6b6;
  background: #fff5f5;
  color: #b43636;
}

.document-pill.is-locked {
  border-color: #e8cf91;
  background: #fff8e6;
  color: #8a5e0f;
}

.document-signature-locked {
  border-color: #ead6a4 !important;
  background:
    linear-gradient(90deg, rgba(255, 248, 230, 0.8), rgba(255, 255, 255, 0) 46%),
    #ffffff;
}

.document-lock-note {
  display: block;
  margin-top: 2px;
  color: #8a5e0f;
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1.3;
}

.signed-lock-label {
  align-self: center;
  color: #8a5e0f;
  font-weight: 900;
}

.document-list-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  gap: 7px;
  justify-self: end;
  width: min(100%, 224px);
  min-width: 0;
}

.document-list-primary-actions,
.document-list-signature-tools {
  display: contents;
}

.document-list-signature-tools {
  grid-column: auto;
}

.document-list-primary-actions .compact-action,
.document-list-signature-tools .compact-action {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-list-head,
#transactionDocumentList.transaction-document-list-view .transaction-document-row {
  grid-template-columns: 96px 26px minmax(280px, 1fr) minmax(112px, 0.18fr) minmax(158px, 0.28fr) minmax(184px, auto);
  gap: 10px;
}

#transactionDocumentList.document-list.transaction-document-list-view {
  overflow: visible;
  border: 0;
  border-radius: 0;
  margin-top: 0;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-list-head {
  min-height: 34px;
  border-bottom: 1px solid #d5dee8;
  padding: 0 0;
  background: #ffffff;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-row {
  min-height: 46px;
  border-bottom: 1px solid #e3e8ee;
  padding: 7px 0;
  background: #ffffff;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-row:hover {
  background: #fbfdff;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-row.is-selected,
.document-folder-document-list.transaction-document-list-view .transaction-document-row.is-selected {
  border-bottom-color: #58aeea;
  background: #fbfdff;
  box-shadow: inset 0 -1px 0 #58aeea;
}

#transactionDocumentList.transaction-document-list-view .document-row-filetype {
  color: #5f6c7c;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

#transactionDocumentList.transaction-document-list-view .document-row-check {
  display: grid;
  place-items: center;
}

#transactionDocumentList.transaction-document-list-view .document-row-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid #c6d0da;
  border-radius: 3px;
  accent-color: var(--lfn-navy, var(--blue));
  cursor: pointer;
}

#transactionDocumentList.transaction-document-list-view .document-row-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#transactionDocumentList.transaction-document-list-view .document-name-input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 4px;
  background: transparent;
  color: var(--lfn-text, var(--ink));
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
}

#transactionDocumentList.transaction-document-list-view .document-name-button,
#transactionDocumentList.transaction-document-list-view .document-name-static,
.document-folder-document-list.transaction-document-list-view .document-name-button,
.document-folder-document-list.transaction-document-list-view .document-name-static {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 4px;
  background: transparent;
  color: var(--lfn-text, var(--ink));
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  line-height: 28px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#transactionDocumentList.transaction-document-list-view .document-name-button,
.document-folder-document-list.transaction-document-list-view .document-name-button {
  cursor: pointer;
}

#transactionDocumentList.transaction-document-list-view .document-name-button:hover,
#transactionDocumentList.transaction-document-list-view .document-name-button:focus,
.document-folder-document-list.transaction-document-list-view .document-name-button:hover,
.document-folder-document-list.transaction-document-list-view .document-name-button:focus {
  border-color: #cfe1ec;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 107, 154, 0.08);
  color: var(--lfn-navy, var(--blue));
  outline: 0;
}

#transactionDocumentList.transaction-document-list-view .document-name-input:hover,
#transactionDocumentList.transaction-document-list-view .document-name-input:focus {
  border-color: #cfe1ec;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 107, 154, 0.08);
  outline: 0;
}

#transactionDocumentList.transaction-document-list-view .document-name-input:disabled {
  border-color: transparent;
  background: transparent;
  color: #52657a;
  box-shadow: none;
}

#transactionDocumentList.transaction-document-list-view .document-row-name small {
  overflow: hidden;
  margin-top: 0;
  font-size: 0.72rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.document-pill {
  justify-content: flex-start;
  width: 100%;
  min-height: 22px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #7b8794;
  font-size: 0.64rem;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.is-shared {
  color: #347ab7;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.is-archived {
  color: #6d7682;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.is-signed {
  color: #1f7a4f;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.is-needs_signature,
#transactionDocumentList.transaction-document-list-view .document-row-status.is-sent,
#transactionDocumentList.transaction-document-list-view .document-row-status.is-waiting {
  color: #c57800;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.is-waiting-not-shared {
  color: #6c3fb3;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.is-not-shared,
#transactionDocumentList.transaction-document-list-view .document-row-status.is-no-signature {
  color: #7b8794;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.is-declined,
#transactionDocumentList.transaction-document-list-view .document-row-status.is-voided {
  color: #b43636;
}

#transactionDocumentList.transaction-document-list-view .document-row-lock-text {
  margin-left: 6px;
  color: #8a5e0f;
}

#transactionDocumentList.transaction-document-list-view .document-list-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
  justify-self: stretch;
  width: auto;
  min-width: 0;
  overflow: visible;
}

#transactionDocumentList.transaction-document-list-view .document-list-primary-actions,
#transactionDocumentList.transaction-document-list-view .document-list-signature-tools {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

#transactionDocumentList.transaction-document-list-view .document-list-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, 70px);
}

#transactionDocumentList.transaction-document-list-view .document-list-signature-tools {
  display: grid;
  gap: 6px;
}

#transactionDocumentList.transaction-document-list-view .document-list-primary-actions .compact-action,
#transactionDocumentList.transaction-document-list-view .document-list-signature-tools .compact-action {
  width: auto;
  min-width: 68px;
  height: 28px;
  min-height: 28px;
  box-sizing: border-box;
  border-radius: 6px;
  margin-top: 0;
  padding: 0 9px;
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

#transactionDocumentList.transaction-document-list-view .document-list-primary-actions .compact-action {
  width: 70px;
  min-width: 70px;
  padding: 0 8px;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu {
  position: relative;
  display: block;
  flex: 0 0 auto;
  height: 28px;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu summary {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  border: 1px solid #c8d9e6;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: #52657a;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu summary::-webkit-details-marker {
  display: none;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu summary:hover,
#transactionDocumentList.transaction-document-list-view .document-row-action-menu summary:focus {
  border-color: rgba(29, 107, 154, 0.42);
  background: var(--agent-accent-soft, #eaf6fb);
  outline: 0;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  width: 154px;
  border: 1px solid #e4e8ed;
  border-radius: 2px;
  padding: 7px 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 39, 65, 0.12);
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu-panel .compact-action,
#transactionDocumentList.transaction-document-list-view .document-row-action-menu-panel .muted-label {
  width: 100%;
  height: 25px;
  min-height: 25px;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--blue, #2b6f9f);
  box-shadow: none;
  justify-content: flex-end;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu-panel .compact-action:hover,
#transactionDocumentList.transaction-document-list-view .document-row-action-menu-panel .compact-action:focus {
  background: #eef6fb;
  color: var(--lfn-navy, #111c2d);
  outline: 0;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu-panel .danger-action {
  color: var(--blue, #2b6f9f);
}

#transactionDocumentList.transaction-document-list-view .document-list-signature-setup {
  display: grid;
  grid-column: 1 / -1;
  gap: 9px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  margin: 4px 0 2px 36px;
  padding: 10px;
  background: #f8fbfd;
}

#transactionDocumentList.transaction-document-list-view .document-list-signature-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

#transactionDocumentList.transaction-document-list-view .document-list-signature-setup-actions .compact-action {
  min-width: 94px;
  min-height: 32px;
  border-radius: 7px;
  padding: 0 10px;
  font-size: 0.74rem;
}

#transactionDocumentList.transaction-document-list-view .document-list-signature-setup .signature-field-template-panel {
  border-color: #d3e0eb;
  background: #ffffff;
}

.document-locked {
  background: #fbfcff;
}

.document-archived {
  background: #f8fafc;
  opacity: 0.76;
}

#transactionDocumentList .document-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.document-signature-url {
  grid-column: 1 / -1;
}

.native-signature-tools {
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  gap: 8px;
}

.native-signature-tools .compact-action {
  min-width: 86px;
  min-height: 34px;
  border-radius: 8px;
  padding: 0 10px;
}

.signature-field-template-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 9px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcff;
}

.signature-field-template-panel.is-locked {
  border-style: dashed;
  background: #f8fafc;
}

.signature-field-template-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.signature-field-template-head strong,
.signature-field-template-head span {
  display: block;
}

.signature-field-template-head strong {
  color: var(--lfn-text, var(--ink));
  font-size: 0.86rem;
}

.signature-field-template-head span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.signature-field-template-list,
.signature-field-add-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.signature-field-chip {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  border: 1px solid #cad8e4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--lfn-text, var(--ink));
  font-size: 0.78rem;
  font-weight: 850;
  overflow: hidden;
}

.signature-field-chip.is-locked {
  grid-template-columns: minmax(0, 1fr) auto;
}

.signature-field-chip-copy {
  overflow: hidden;
  padding: 0 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-field-size-control {
  display: inline-grid;
  grid-template-columns: auto 58px;
  gap: 5px;
  align-items: center;
  min-width: 0;
  border-left: 1px solid #dbe5ef;
  padding: 0 6px;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.signature-field-size-control span {
  padding: 0;
}

.signature-field-size-control input {
  width: 58px;
  min-height: 24px;
  border: 1px solid #dbe5ef;
  border-radius: 6px;
  padding: 0 4px;
  background: #ffffff;
  color: var(--lfn-text, var(--ink));
  font-size: 0.76rem;
  font-weight: 900;
}

.signature-field-chip button {
  width: 22px;
  height: 28px;
  border: 0;
  border-left: 1px solid #dbe5ef;
  background: #f7fafc;
  color: #b43636;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.signature-field-empty {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.signature-field-add-buttons .compact-action {
  min-height: 30px;
  padding: 0 9px;
  font-size: 0.76rem;
}

.agent-client-access-panel {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fbfcff;
}

.agent-client-access-panel strong,
.agent-client-access-panel span {
  display: block;
}

.agent-client-access-panel strong {
  color: var(--lfn-text, var(--ink));
  font-size: 0.95rem;
}

.agent-client-access-panel span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

body:not(.broker-context-view) .broker-only-feature {
  display: none !important;
}

.cda-signature-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  margin: 12px 0;
  padding: 12px 14px;
  background: #fbfcff;
}

.cda-signature-panel div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cda-signature-panel strong,
.cda-signature-panel span {
  display: block;
}

.cda-signature-panel strong {
  color: var(--lfn-text, var(--ink));
  font-size: 0.94rem;
}

.cda-signature-panel span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.cda-signature-panel .compact-action {
  flex: 0 0 auto;
}

.document-controls input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  padding: 0 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: var(--lfn-text, var(--ink));
  font-weight: 800;
  outline: 0;
}

.document-controls input:focus {
  border-color: var(--lfn-navy, var(--blue));
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.1);
}

.transaction-documents-page .transaction-documents-card {
  padding: 16px 18px 18px;
}

.transaction-documents-page .transaction-documents-card .card-header {
  align-items: center;
  min-height: 44px;
  padding-bottom: 12px;
}

.transaction-documents-page .transaction-documents-card .card-header h2 {
  color: var(--lfn-navy, var(--blue));
  font-size: 1.05rem;
  line-height: 1.1;
}

.transaction-documents-page .transaction-documents-card .card-kicker {
  max-width: 520px;
  margin-top: 3px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.transaction-documents-page .transaction-doc-view-controls {
  gap: 0;
  overflow: hidden;
  border: 1px solid #c9dceb;
  border-radius: 7px;
  background: #ffffff;
}

.transaction-documents-page .transaction-doc-view-controls .compact-action {
  min-width: 112px;
  min-height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.72rem;
}

.transaction-documents-page .transaction-doc-view-controls .compact-action + .compact-action {
  border-left: 1px solid #d6e2ec;
}

.transaction-documents-page .transaction-doc-view-controls .compact-action.active {
  background: var(--lfn-navy, var(--blue));
  box-shadow: inset 0 0 0 1px var(--lfn-navy, var(--blue));
}

.transaction-documents-card .compact-doc-dropzone {
  min-height: 42px;
  grid-template-columns: 20px minmax(0, 1fr) 104px;
  border-color: #d8e3ee;
  margin: 2px 0 0;
  padding: 7px 0;
}

.transaction-documents-card .transaction-doc-dropzone span {
  width: 18px;
  height: 18px;
  background: #edf6fd;
  color: var(--lfn-navy, var(--blue));
  font-size: 0.72rem;
}

.transaction-documents-card .compact-doc-dropzone strong {
  color: var(--lfn-navy, var(--blue));
  font-size: 0.68rem;
  letter-spacing: 0.06em;
}

.transaction-documents-card .compact-doc-dropzone em {
  justify-self: end;
  width: 96px;
  min-height: 26px;
  border-radius: 5px;
  padding: 0 10px;
  font-size: 0.66rem;
  white-space: nowrap;
}

.transaction-documents-page #transactionDetailMessage {
  margin: 8px 0 0;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-list-head,
#transactionDocumentList.transaction-document-list-view .transaction-document-row {
  grid-template-columns: 74px 24px minmax(260px, 1fr) 96px 136px 176px;
  gap: 9px;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-list-head {
  min-height: 30px;
  color: #5b6a7b;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-list-head span:last-child {
  text-align: right;
}

#transactionDocumentList.transaction-document-list-view .transaction-document-row {
  min-height: 40px;
  padding: 6px 0;
}

#transactionDocumentList.transaction-document-list-view .document-row-filetype {
  color: #52657a;
  font-size: 0.62rem;
  font-weight: 900;
}

#transactionDocumentList.transaction-document-list-view .document-row-filetype-button,
.document-folder-document-list.transaction-document-list-view .document-row-filetype-button {
  justify-self: start;
  border: 0;
  border-radius: 4px;
  padding: 3px 5px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

#transactionDocumentList.transaction-document-list-view .document-row-filetype-button:hover,
#transactionDocumentList.transaction-document-list-view .document-row-filetype-button:focus,
.document-folder-document-list.transaction-document-list-view .document-row-filetype-button:hover,
.document-folder-document-list.transaction-document-list-view .document-row-filetype-button:focus {
  background: #eef3f8;
  color: var(--lfn-navy, var(--blue));
  outline: 0;
}

#transactionDocumentList.transaction-document-list-view .document-name-input {
  min-height: 25px;
  font-size: 0.8rem;
}

#transactionDocumentList.transaction-document-list-view .document-row-status.document-pill {
  font-size: 0.6rem;
  font-weight: 950;
}

#transactionDocumentList.transaction-document-list-view .document-list-primary-actions {
  grid-template-columns: repeat(2, 72px);
}

#transactionDocumentList.transaction-document-list-view .document-list-primary-actions .compact-action {
  width: 72px;
  min-width: 72px;
  height: 26px;
  min-height: 26px;
  border-radius: 5px;
  font-size: 0.62rem;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu,
#transactionDocumentList.transaction-document-list-view .document-row-action-menu summary {
  width: 26px;
  height: 26px;
}

#transactionDocumentList.transaction-document-list-view .document-row-action-menu summary {
  border-radius: 5px;
  font-size: 0.95rem;
}

.transaction-documents-page .document-export-panel,
.transaction-documents-page .cda-signature-panel {
  min-height: 58px;
  border-color: #d8e4ef;
  border-radius: 7px;
  margin: 12px 0 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.transaction-documents-page .document-export-panel div,
.transaction-documents-page .cda-signature-panel div {
  gap: 2px;
}

.transaction-documents-page .document-export-panel strong,
.transaction-documents-page .cda-signature-panel strong {
  color: var(--lfn-navy, var(--blue));
  font-size: 0.88rem;
}

.transaction-documents-page .document-export-panel span,
.transaction-documents-page .cda-signature-panel span {
  font-size: 0.75rem;
  line-height: 1.25;
}

.transaction-documents-page .document-export-actions {
  display: grid;
  grid-template-columns: 126px 126px;
  gap: 6px;
}

.transaction-documents-page .document-export-actions .compact-action,
.transaction-documents-page .cda-signature-panel .compact-action {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 0.76rem;
}

.transaction-documents-page .cda-signature-panel .compact-action {
  min-width: 132px;
}

.transaction-documents-page .document-card-header {
  align-items: start;
  border-bottom: 0;
  padding-bottom: 14px;
}

.document-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.document-card-links .document-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #c8d8e8;
  border-radius: 6px;
  padding: 0 14px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(8, 36, 59, 0.06);
  text-decoration: none;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.document-card-links .document-card-primary-action {
  border-color: #0b456f;
  background: var(--lfn-navy, var(--blue));
  color: #ffffff;
}

.document-card-links .document-card-secondary-action {
  border-color: #c8d8e8;
  background: #ffffff;
  color: var(--lfn-navy, var(--blue));
}

.document-card-links .document-card-action:hover,
.document-card-links .document-card-action:focus,
.document-card-links .document-card-action.active {
  border-color: #0b456f;
  box-shadow: 0 10px 22px rgba(8, 36, 59, 0.12);
  transform: translateY(-1px);
}

.document-card-links .document-card-primary-action:hover,
.document-card-links .document-card-primary-action:focus,
.document-card-links .document-card-primary-action.active {
  background: #0b456f;
  color: #ffffff;
}

.document-selection-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  justify-content: stretch;
  border-top: 1px solid #e4ebf2;
  border-bottom: 1px solid #d7e1eb;
  padding: 9px 0 10px;
}

.document-selection-bar[hidden] {
  display: none;
}

.document-selection-bar span {
  min-width: 0;
  overflow: hidden;
  color: var(--lfn-navy, var(--blue));
  font-size: 0.74rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  align-items: center;
  justify-content: flex-end;
}

.document-selection-bar .compact-action {
  min-height: 28px;
  border-radius: 5px;
  padding: 0 10px;
  font-size: 0.66rem;
}

.document-selection-bar .purple-button {
  min-width: 150px;
  min-height: 30px;
  border-radius: 999px;
}

.document-selection-bar .document-link-button:disabled {
  color: #a8b2bd;
  cursor: not-allowed;
}

.document-link-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--lfn-navy, var(--blue));
  cursor: pointer;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.document-link-button:hover,
.document-link-button:focus,
.document-link-button.active {
  color: var(--lfn-navy-2, var(--blue));
  outline: 0;
}

.document-folder-row {
  display: grid;
  grid-template-columns: 102px 22px minmax(0, 1fr) auto 20px;
  gap: 9px;
  align-items: center;
  min-height: 34px;
  border-top: 1px solid #e3e8ee;
  border-bottom: 1px solid #ccd8e3;
  color: #4f5f70;
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.document-root-folder-row {
  grid-template-columns: 102px 22px minmax(0, 1fr) 20px;
}

.document-folder-row input {
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid #c8d3df;
  border-radius: 3px;
  pointer-events: none;
}

.document-folder-row strong {
  position: relative;
  color: var(--lfn-navy, var(--blue));
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-folder-row strong::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 10px;
  margin-right: 7px;
  border-radius: 2px 2px 1px 1px;
  background: var(--lfn-navy, var(--blue));
  box-shadow: 0 -3px 0 -1px #7f8ba0;
  vertical-align: -1px;
}

.document-row-more {
  border: 0;
  background: transparent;
  color: #8a96a3;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.document-add-tiles {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-bottom: 1px solid #dde6ee;
  padding: 0 0 10px;
  transition:
    background 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.document-add-tiles[hidden] {
  display: none;
}

.document-add-tiles::before {
  content: "Drag & drop files here";
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 2px 12px;
  background: #ffffff;
  color: var(--lfn-navy, var(--blue));
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.document-add-tiles.is-dragging {
  border: 1px dashed #65b8ef;
  border-radius: 6px;
  padding: 10px;
  overflow: hidden;
  background: #eef7ff;
  box-shadow: inset 0 0 0 1px rgba(101, 184, 239, 0.18);
}

.document-add-tiles.is-dragging::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 5px;
  background: #eef7ff;
  pointer-events: none;
}

.document-add-tiles.is-dragging::before {
  content: "Drag & drop PDF here";
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  border: 1px solid #cce7fb;
  padding: 7px 18px;
  background: #ffffff;
  color: #2c8fce;
  box-shadow: 0 10px 24px rgba(15, 80, 120, 0.12);
}

.document-add-tiles.is-dragging .document-add-tile {
  opacity: 0;
}

.document-add-tiles.is-drop-ready {
  border-color: #08af80;
  background: #bff4e2;
  box-shadow:
    inset 0 0 0 1px rgba(8, 175, 128, 0.36),
    0 10px 28px rgba(8, 175, 128, 0.12);
}

.document-add-tiles.is-drop-ready::after {
  background: #bff4e2;
}

.document-add-tiles.is-drop-ready::before {
  content: "Drop PDF here";
  border-color: #08af80;
  background: #08af80;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(8, 175, 128, 0.26);
}

.document-add-tiles.is-drop-reject {
  border-color: #ff786b;
  background: #fff0ed;
  box-shadow: inset 0 0 0 1px rgba(255, 120, 107, 0.24);
}

.document-add-tiles.is-drop-reject::after {
  background: #ffe1db;
}

.document-add-tiles.is-drop-reject::before {
  content: "PDFs only";
  border-color: #ff786b;
  background: #ff786b;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(255, 120, 107, 0.24);
}

.document-add-tile {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 166px;
  border: 1px dashed #9aa8ba;
  border-radius: 0;
  padding: 22px 18px;
  background: #f3f6fa;
  color: var(--lfn-navy, var(--blue));
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}

.document-add-tile input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.document-add-tile:hover,
.document-add-tile:focus-within,
.document-add-tile:focus {
  background: #eef3f8;
  outline: 0;
}

.document-add-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--lfn-navy, var(--blue));
  font-size: 2rem;
  line-height: 1;
}

.document-add-tile strong {
  color: var(--lfn-navy, var(--blue));
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.document-add-tile small {
  max-width: 230px;
  color: #8b96a1;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.55;
}

.document-local-folders {
  display: grid;
}

.document-local-folder {
  display: grid;
  border-top: 1px solid #dde6ee;
}

.document-local-folder .document-folder-row {
  border-top: 0;
}

.document-folder-name-input {
  width: 100%;
  min-width: 0;
  min-height: 26px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0 4px 0 22px;
  background:
    linear-gradient(var(--lfn-navy, var(--blue)), var(--lfn-navy, var(--blue))) 3px 12px / 14px 8px no-repeat,
    linear-gradient(#7f8ba0, #7f8ba0) 4px 8px / 10px 4px no-repeat,
    transparent;
  color: var(--lfn-navy, var(--blue));
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-folder-name-input:focus {
  border-color: #b9c5d4;
  background-color: #ffffff;
  outline: 0;
}

.document-folder-add-tiles {
  border-top: 1px solid #eef3f7;
}

.document-local-folder-empty {
  display: grid;
  min-height: 42px;
  align-items: center;
  border-bottom: 1px solid #e3e8ee;
  color: #8b96a1;
  font-size: 0.72rem;
  font-weight: 750;
}

.document-folder-document-list.transaction-document-list-view {
  gap: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  margin: 0;
  background: #ffffff;
  box-shadow: none;
}

.document-folder-document-list.transaction-document-list-view .transaction-document-row {
  display: grid;
  grid-template-columns: 74px 24px minmax(260px, 1fr) 96px 136px 176px;
  gap: 9px;
  align-items: center;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid #e3e8ee;
  border-radius: 0;
  padding: 6px 0;
  background: #ffffff;
}

.document-folder-document-list.transaction-document-list-view .transaction-document-row:hover {
  background: #fbfdff;
}

.document-folder-document-list.transaction-document-list-view .document-row-filetype {
  color: #52657a;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.document-folder-document-list.transaction-document-list-view .document-row-check {
  display: grid;
  place-items: center;
}

.document-folder-document-list.transaction-document-list-view .document-row-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  border: 1px solid #c6d0da;
  border-radius: 3px;
  accent-color: var(--lfn-navy, var(--blue));
  cursor: pointer;
}

.document-folder-document-list.transaction-document-list-view .document-row-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.document-folder-document-list.transaction-document-list-view .document-name-input {
  width: 100%;
  min-width: 0;
  min-height: 25px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 4px;
  background: transparent;
  color: var(--lfn-text, var(--ink));
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.document-folder-document-list.transaction-document-list-view .document-name-button,
.document-folder-document-list.transaction-document-list-view .document-name-static {
  min-height: 25px;
  font-size: 0.8rem;
  line-height: 25px;
}

.document-folder-document-list.transaction-document-list-view .document-name-input:hover,
.document-folder-document-list.transaction-document-list-view .document-name-input:focus {
  border-color: #cfe1ec;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(29, 107, 154, 0.08);
  outline: 0;
}

.document-folder-document-list.transaction-document-list-view .document-name-input:disabled {
  border-color: transparent;
  background: transparent;
  color: #52657a;
  box-shadow: none;
}

.document-folder-document-list.transaction-document-list-view .document-row-status.document-pill {
  justify-content: flex-start;
  width: 100%;
  min-height: 22px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #7b8794;
  font-size: 0.6rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.document-folder-document-list.transaction-document-list-view .document-row-status.is-shared {
  color: #347ab7;
}

.document-folder-document-list.transaction-document-list-view .document-row-status.is-archived {
  color: #6d7682;
}

.document-folder-document-list.transaction-document-list-view .document-row-status.is-signed {
  color: #1f7a4f;
}

.document-folder-document-list.transaction-document-list-view .document-row-status.is-needs_signature,
.document-folder-document-list.transaction-document-list-view .document-row-status.is-sent,
.document-folder-document-list.transaction-document-list-view .document-row-status.is-waiting {
  color: #c57800;
}

.document-folder-document-list.transaction-document-list-view .document-row-status.is-waiting-not-shared {
  color: #6c3fb3;
}

.document-folder-document-list.transaction-document-list-view .document-row-status.is-not-shared,
.document-folder-document-list.transaction-document-list-view .document-row-status.is-no-signature {
  color: #7b8794;
}

.document-folder-document-list.transaction-document-list-view .document-row-status.is-declined,
.document-folder-document-list.transaction-document-list-view .document-row-status.is-voided {
  color: #b43636;
}

.document-folder-document-list.transaction-document-list-view .document-list-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
  justify-self: stretch;
  width: auto;
  min-width: 0;
  overflow: visible;
}

.document-folder-document-list.transaction-document-list-view .document-list-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, 72px);
  flex: 0 0 auto;
  gap: 6px;
  align-items: center;
}

.document-folder-document-list.transaction-document-list-view .document-list-signature-tools {
  display: grid;
  gap: 6px;
}

.document-folder-document-list.transaction-document-list-view .document-list-primary-actions .compact-action,
.document-folder-document-list.transaction-document-list-view .document-list-signature-tools .compact-action {
  width: 72px;
  min-width: 72px;
  height: 26px;
  min-height: 26px;
  box-sizing: border-box;
  border-radius: 5px;
  margin-top: 0;
  padding: 0 8px;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.document-folder-document-list.transaction-document-list-view .document-row-action-menu {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
}

.document-folder-document-list.transaction-document-list-view .document-row-action-menu summary {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  box-sizing: border-box;
  border: 1px solid #c8d9e6;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.78);
  color: #52657a;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.document-folder-document-list.transaction-document-list-view .document-row-action-menu summary::-webkit-details-marker {
  display: none;
}

.document-folder-document-list.transaction-document-list-view .document-row-action-menu summary:hover,
.document-folder-document-list.transaction-document-list-view .document-row-action-menu summary:focus {
  border-color: rgba(29, 107, 154, 0.42);
  background: var(--agent-accent-soft, #eaf6fb);
  outline: 0;
}

.document-folder-document-list.transaction-document-list-view .document-row-action-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  width: 154px;
  border: 1px solid #e4e8ed;
  border-radius: 2px;
  padding: 7px 0;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 39, 65, 0.12);
}

.document-folder-document-list.transaction-document-list-view .document-row-action-menu-panel .compact-action,
.document-folder-document-list.transaction-document-list-view .document-row-action-menu-panel .muted-label {
  width: 100%;
  height: 25px;
  min-height: 25px;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
  color: var(--blue, #2b6f9f);
  box-shadow: none;
  justify-content: flex-end;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
}

.document-folder-document-list.transaction-document-list-view .document-row-action-menu-panel .compact-action:hover,
.document-folder-document-list.transaction-document-list-view .document-row-action-menu-panel .compact-action:focus {
  background: #eef6fb;
  color: var(--lfn-navy, #111c2d);
  outline: 0;
}

.document-folder-document-list.transaction-document-list-view .document-row-action-menu-panel .danger-action {
  color: var(--blue, #2b6f9f);
}

.document-template-drawer {
  display: grid;
  gap: 10px;
  border-bottom: 1px solid #dde6ee;
  padding: 12px 0;
}

.document-template-drawer[hidden] {
  display: none;
}

.document-template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.document-template-actions select {
  min-width: 128px;
}

.document-template-drawer .template-upload {
  justify-self: start;
  min-width: 150px;
  min-height: 30px;
  border-style: solid;
}

.document-template-drawer .document-template-library {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 340px;
}

.document-template-drawer .document-library-empty {
  grid-column: 1 / -1;
}

.transaction-documents-page #transactionDetailMessage:empty {
  display: none;
}

.transaction-document-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 0.44fr) minmax(0, 0.56fr);
  gap: 12px;
  margin: 0 0 14px;
}

.document-library-panel,
.document-draft-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.document-workbench-header {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
  min-width: 0;
}

.document-workbench-header div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.document-workbench-header strong {
  color: var(--lfn-navy, var(--blue));
  font-size: 0.9rem;
  line-height: 1.1;
}

.document-workbench-header span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.25;
}

.document-workbench-header select {
  flex: 0 0 112px;
  min-height: 30px;
  border: 1px solid #cfe0ed;
  border-radius: 6px;
  padding: 0 8px;
  background: #ffffff;
  color: var(--lfn-text, var(--ink));
  font-size: 0.75rem;
  font-weight: 850;
}

.template-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px dashed #bad3e8;
  border-radius: 7px;
  background: #ffffff;
  color: #347ab7;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.template-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.document-template-library {
  display: grid;
  gap: 8px;
  max-height: 286px;
  overflow: auto;
  padding-right: 2px;
}

.document-template-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 98px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid #dfe8f1;
  border-radius: 7px;
  padding: 10px;
  background: #ffffff;
}

.document-template-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.document-template-card strong,
.document-template-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-template-card strong {
  color: var(--lfn-text, var(--ink));
  font-size: 0.82rem;
  line-height: 1.15;
}

.document-template-card small {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.68rem;
  font-weight: 800;
}

.document-template-category {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 7px;
  background: #edf6fd;
  color: #347ab7;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.document-template-card .compact-action {
  width: 98px;
  min-height: 28px;
  border-radius: 5px;
  padding: 0 8px;
  font-size: 0.66rem;
}

.document-library-empty {
  display: grid;
  gap: 4px;
  min-height: 118px;
  place-content: center;
  border: 1px dashed #d4e1ed;
  border-radius: 7px;
  padding: 16px;
  background: #ffffff;
  text-align: center;
}

.document-library-empty strong {
  color: var(--lfn-navy, var(--blue));
  font-size: 0.88rem;
}

.document-library-empty span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.35;
}

.document-draft-workspace {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 0.65fr);
  gap: 10px;
  min-width: 0;
}

.document-draft-workspace > .document-library-empty {
  grid-column: 1 / -1;
}

.document-draft-list {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.document-draft-list button {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid #dfe8f1;
  border-radius: 7px;
  padding: 9px;
  background: #ffffff;
  color: var(--lfn-text, var(--ink));
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.document-draft-list button.active {
  border-color: #9fc2dd;
  background: #edf6fd;
}

.document-draft-list strong,
.document-draft-list span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-draft-list strong {
  font-size: 0.78rem;
}

.document-draft-list span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.66rem;
  font-weight: 850;
}

.document-draft-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.document-draft-editor-head {
  display: flex;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
  min-width: 0;
}

.document-draft-editor-head div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.document-draft-editor-head strong,
.document-draft-editor-head > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-draft-editor-head strong {
  color: var(--lfn-text, var(--ink));
  font-size: 0.88rem;
}

.document-draft-editor-head > span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.68rem;
  font-weight: 850;
}

.document-draft-status {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eef3f8;
  color: #52657a;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.document-draft-status.is-shared,
.document-draft-status.is-filed {
  background: #edf7f1;
  color: #1f7a4f;
}

.document-draft-status.is-progress {
  background: #fff5df;
  color: #a76617;
}

.document-draft-editor label {
  display: grid;
  gap: 5px;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.document-draft-editor input {
  width: 100%;
  min-height: 34px;
  border: 1px solid #d6e3ee;
  border-radius: 6px;
  padding: 0 10px;
  background: #fbfdff;
  color: var(--lfn-text, var(--ink));
  font-size: 0.82rem;
  font-weight: 850;
}

.document-draft-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.document-draft-facts div {
  min-width: 0;
  border: 1px solid #e2eaf2;
  border-radius: 6px;
  padding: 8px;
  background: #fbfdff;
}

.document-draft-facts dt,
.document-draft-facts dd {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-draft-facts dt {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.document-draft-facts dd {
  margin-top: 3px;
  color: var(--lfn-text, var(--ink));
  font-size: 0.72rem;
  font-weight: 850;
}

.document-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.document-draft-actions .compact-action {
  min-height: 30px;
  border-radius: 5px;
  padding: 0 10px;
  font-size: 0.68rem;
}

.document-vault-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #d8e3ee;
  padding-top: 12px;
}

.document-vault-divider div {
  display: grid;
  gap: 2px;
}

.document-vault-divider strong {
  color: var(--lfn-navy, var(--blue));
  font-size: 0.88rem;
}

.document-vault-divider span {
  color: var(--lfn-muted, var(--muted));
  font-size: 0.73rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .client-portal-grid {
    grid-template-columns: 1fr;
  }

  .client-property-card,
  .client-overview-card,
  .client-signature-task-card,
  .client-timeline-card,
  .client-contact-card,
  .client-document-card {
    grid-column: 1;
    grid-row: auto;
  }

  .client-overview-facts,
  .client-signature-task {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .client-timeline-item,
  .client-contact-row {
    grid-template-columns: 1fr;
    gap: 7px;
    align-items: start;
  }

  .client-timeline-dot {
    display: none;
  }

  .client-timeline-item time,
  .client-timeline-item em {
    justify-self: start;
    text-align: left;
  }

  .client-signature-task-actions {
    justify-content: flex-start;
  }

  .client-document-list .document-list-head {
    display: none;
  }

  .client-document-list article,
  #transactionDocumentList .document-list-head,
  #transactionDocumentList article {
    grid-template-columns: 1fr;
  }

  #transactionDocumentList.transaction-document-list-view .transaction-document-list-head {
    display: none;
  }

  .transaction-documents-page .transaction-documents-card .card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .transaction-documents-page .transaction-doc-view-controls {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .transaction-documents-page .transaction-doc-view-controls .compact-action {
    flex: 1 1 120px;
  }

  .transaction-documents-page .document-card-header {
    flex-direction: column;
    gap: 8px;
  }

  .document-card-links {
    justify-content: flex-start;
  }

  .document-folder-row {
    grid-template-columns: 76px 18px minmax(54px, 1fr) auto 16px;
    gap: 6px;
  }

  .document-root-folder-row {
    grid-template-columns: 76px 18px minmax(54px, 1fr) 16px;
  }

  .document-folder-row .document-link-button {
    font-size: 0.6rem;
    letter-spacing: 0.03em;
  }

  .document-folder-name-input {
    font-size: 0.62rem;
    padding-left: 19px;
  }

  .document-add-tiles,
  .document-template-drawer .document-template-library {
    grid-template-columns: 1fr;
  }

  .document-add-tiles::before {
    display: none;
  }

  .document-add-tile {
    min-height: 118px;
  }

  .transaction-document-workbench,
  .document-draft-workspace,
  .document-draft-facts {
    grid-template-columns: 1fr;
  }

  .document-workbench-header {
    align-items: stretch;
    flex-direction: column;
  }

  .document-workbench-header select,
  .document-template-card .compact-action {
    width: 100%;
  }

  .document-workbench-header select {
    flex: 0 0 auto;
  }

  .document-template-card {
    grid-template-columns: 1fr;
  }

  #transactionDocumentList.transaction-document-list-view article {
    grid-template-columns: 1fr;
  }

  #transactionDocumentList.transaction-document-list-view .transaction-document-row {
    grid-template-columns: 54px 24px minmax(0, 1fr);
    gap: 7px;
  }

  .document-folder-document-list.transaction-document-list-view .transaction-document-row {
    grid-template-columns: 54px 24px minmax(0, 1fr);
    gap: 7px;
  }

  #transactionDocumentList.transaction-document-list-view .document-row-filetype,
  #transactionDocumentList.transaction-document-list-view .document-row-status.document-pill,
  .document-folder-document-list.transaction-document-list-view .document-row-filetype,
  .document-folder-document-list.transaction-document-list-view .document-row-status.document-pill {
    width: fit-content;
  }

  #transactionDocumentList.transaction-document-list-view .document-row-check,
  .document-folder-document-list.transaction-document-list-view .document-row-check {
    display: grid;
  }

  #transactionDocumentList.transaction-document-list-view .document-list-actions,
  .document-folder-document-list.transaction-document-list-view .document-list-actions {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    justify-content: flex-start;
    overflow: visible;
  }

  #transactionDocumentList.transaction-document-list-view .document-row-status.document-pill,
  .document-folder-document-list.transaction-document-list-view .document-row-status.document-pill {
    grid-column: 3;
  }

  .document-list-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: start;
    justify-self: stretch;
    width: 100%;
  }

  .document-pill {
    justify-content: flex-start;
    width: 100%;
  }

  .client-document-status,
  #transactionDocumentList .document-controls {
    grid-column: auto;
  }

  #transactionDocumentList .document-controls {
    grid-template-columns: 1fr;
  }

  .client-document-actions,
  .client-history-list article {
    grid-template-columns: 1fr;
  }

  .cda-signature-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .document-list-actions,
  .document-export-actions {
    grid-template-columns: 1fr;
  }
}

.signature-page {
  min-height: 100vh;
  padding: 22px;
  background:
    linear-gradient(180deg, #f8fbfd 0%, #eef4f8 100%),
    #f4f8fb;
}

.signature-page [hidden] {
  display: none !important;
}

.signature-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.signature-header {
  position: sticky;
  top: 14px;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #0c3855 0%, #174e70 100%);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(8, 36, 59, 0.18);
}

.signature-logo {
  display: grid;
  place-items: center;
  width: 132px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.signature-logo img {
  max-width: 104px;
  width: 82%;
  height: auto;
}

.signature-header-copy {
  min-width: 0;
}

.signature-header .eyebrow {
  margin: 0 0 3px;
  color: #f3ca76;
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.signature-header h1 {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: #ffffff;
  font-size: clamp(1rem, 1.7vw, 1.24rem);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-header p:last-child {
  display: block;
  max-width: 720px;
  overflow: hidden;
  margin: 4px 0 0;
  color: rgba(236, 245, 250, 0.78);
  font-size: 0.8rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-header-actions {
  display: flex;
  justify-content: flex-end;
}

.signature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 370px);
  gap: 14px;
  align-items: start;
}

.signature-document-panel,
.signature-card {
  overflow: hidden;
  border: 1px solid #d7e3ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(8, 36, 59, 0.08);
}

.signature-panel-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid #dce7f0;
  background: #ffffff;
}

.signature-panel-header > div {
  min-width: 0;
}

.signature-panel-header strong,
.signature-panel-header span {
  display: block;
}

.signature-panel-header strong {
  overflow: hidden;
  color: var(--lfn-text, var(--ink));
  font-size: 0.92rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-panel-header span {
  margin-top: 3px;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.74rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signature-panel-header .signature-file-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 42px;
  min-height: 26px;
  overflow: visible;
  border: 1px solid #c8d8e8;
  border-radius: 999px;
  margin-top: 0;
  padding: 0 10px;
  background: #f8fbfd;
  color: var(--lfn-navy, #07304f);
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1;
  text-overflow: clip;
  text-transform: uppercase;
  white-space: nowrap;
}

.signature-document-preview {
  height: calc(100vh - 156px);
  min-height: 620px;
  background:
    linear-gradient(180deg, #edf3f8 0%, #e5edf4 100%);
}

.signature-document-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.signature-card {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.signature-status {
  border: 1px solid #d9e4ee;
  border-left: 4px solid var(--lfn-gold, #d8a94f);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fbfdff;
}

.signature-status strong,
.signature-status span,
.signature-complete strong,
.signature-complete span {
  display: block;
}

.signature-status strong {
  color: var(--lfn-text, var(--ink));
  font-size: 0.9rem;
}

.signature-status span {
  margin-top: 3px;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.4;
}

.signature-status.success {
  border-color: #bfe3cf;
  background: #f0faf4;
}

.signature-status.success strong,
.signature-status.success span {
  color: #1f7a4f;
}

.signature-status.error {
  border-color: #f0b6b6;
  background: #fff5f5;
}

.signature-status.error strong,
.signature-status.error span {
  color: #b43636;
}

.signature-form {
  display: grid;
  gap: 12px;
}

.signature-form label {
  display: grid;
  gap: 6px;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.signature-form input[type="text"] {
  min-height: 44px;
  border: 1px solid #cbdbe9;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--lfn-text, var(--ink));
  font-size: 1rem;
  font-weight: 800;
  outline: 0;
}

.signature-form input[type="text"]:focus {
  border-color: var(--lfn-navy, var(--blue));
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.1);
}

.signature-consent {
  display: grid;
  gap: 9px;
  border: 1px solid #dce7f0;
  border-radius: 7px;
  padding: 12px;
  background: #fbfdff;
}

.signature-consent h2 {
  margin: 0;
  color: var(--lfn-text, var(--ink));
  font-size: 0.9rem;
}

.signature-consent p {
  margin: 0;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.4;
}

.signature-required-fields {
  display: grid;
  gap: 9px;
  border: 1px solid #dbe5ef;
  border-radius: 7px;
  padding: 12px;
  background: #ffffff;
}

.signature-required-fields[hidden] {
  display: none;
}

.signature-required-fields h2 {
  margin: 0;
  color: var(--lfn-text, var(--ink));
  font-size: 0.9rem;
}

.signature-field-list {
  display: grid;
  gap: 10px;
}

.signature-field-item {
  display: grid;
  gap: 7px;
}

.signature-field-item > span,
.signature-field-item .signature-field-note {
  color: var(--lfn-muted, var(--muted));
  font-size: max(0.78rem, var(--signature-field-font-size, 11px));
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.signature-checkbox.signature-field-item > span {
  color: var(--lfn-text, var(--ink));
  font-size: max(0.9rem, var(--signature-field-font-size, 11px));
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.signature-field-item .signature-field-note {
  border: 1px solid #dce7f0;
  border-radius: 7px;
  padding: 9px 10px;
  background: #fbfdff;
  color: var(--lfn-text, var(--ink));
  line-height: 1.35;
  text-transform: none;
}

.signature-field-item input[type="text"],
.signature-field-item input[type="date"] {
  min-height: 42px;
  border: 1px solid #cbdbe9;
  border-radius: 7px;
  padding: 0 12px;
  color: var(--lfn-text, var(--ink));
  font-size: max(1rem, var(--signature-field-font-size, 11px));
  font-weight: 800;
  outline: 0;
}

.signature-field-item input[type="text"]:focus,
.signature-field-item input[type="date"]:focus {
  border-color: var(--lfn-navy, var(--blue));
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.1);
}

.signature-checkbox {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  color: var(--lfn-text, var(--ink));
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.signature-form .signature-checkbox {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.signature-form .signature-checkbox span {
  color: var(--lfn-text, var(--ink));
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.signature-checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.signature-intent {
  border: 1px solid #dce7f0;
  border-radius: 7px;
  padding: 9px 10px;
  background: #ffffff;
}

.signature-intent strong,
.signature-intent span {
  display: block;
}

.signature-intent strong {
  color: var(--lfn-text, var(--ink));
}

.signature-intent span {
  margin-top: 3px;
  color: var(--lfn-muted, var(--muted));
  font-size: 0.76rem;
  font-weight: 800;
}

.signature-form .purple-button,
.signature-form .outline-purple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border-radius: 7px;
}

.signature-page .purple-button {
  border-color: var(--lfn-navy, #07304f);
  background: var(--lfn-navy, #07304f);
  color: #ffffff;
}

.signature-page .purple-button:hover,
.signature-page .purple-button:focus {
  border-color: #0b456f;
  background: #0b456f;
  color: #ffffff;
}

.signature-page .outline-purple {
  border-color: #c8d8e8;
  background: #ffffff;
  color: var(--lfn-navy, #07304f);
}

.signature-page .outline-purple:hover,
.signature-page .outline-purple:focus {
  border-color: #9fb9cf;
  background: #eef5fb;
  color: var(--lfn-navy, #07304f);
}

.signature-header .outline-purple {
  min-width: 116px;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  white-space: nowrap;
}

.signature-header .outline-purple:hover,
.signature-header .outline-purple:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.signature-complete {
  display: grid;
  gap: 10px;
  border: 1px solid #bfe3cf;
  border-radius: 8px;
  padding: 14px;
  background: #f0faf4;
}

.signature-complete strong {
  color: #1f7a4f;
}

.signature-complete span {
  color: #1f7a4f;
  font-weight: 800;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .signature-page {
    padding: 12px;
  }

  .signature-header,
  .signature-grid {
    grid-template-columns: 1fr;
  }

  .signature-header {
    position: static;
  }

  .signature-logo {
    max-width: 220px;
  }

  .signature-card {
    position: static;
  }

  .signature-document-preview {
    height: 62vh;
    min-height: 420px;
  }

  .signature-panel-header,
  .signature-header-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

/* CRM lead workspace polish */
.lfn-dashboard [hidden] {
  display: none !important;
}

#pipeline.white-card {
  container-type: inline-size;
  padding: 20px;
}

#pipeline .card-header {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

#pipeline .card-header > div {
  min-width: 0;
}

#pipeline .card-header h2 {
  font-size: 1.08rem;
  line-height: 1.1;
}

#pipeline .card-header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  font-size: 0.9rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

#pipeline .card-header a:hover {
  border-color: #b9cce0;
  background: #eef5fb;
}

.crm-stage-strip {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  margin-bottom: 14px;
}

.crm-stage-strip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  background: linear-gradient(180deg, #fbfdff, #f5f8fc);
  color: #52627a;
  font-size: 0.82rem;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.crm-stage-strip button .stage-filter-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-stage-strip button .stage-filter-count {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  background: #ffffff;
  color: #52627a;
  font-size: 0.75rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px #dce7f1;
}

.crm-stage-strip button:hover {
  border-color: #bdd0e2;
  background: #f8fbff;
  color: var(--lfn-navy);
}

.crm-stage-strip button.active {
  border-color: #b8d0e5;
  background: #eef7ff;
  color: var(--lfn-navy);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(7, 48, 79, 0.06);
}

.crm-stage-strip button.active .stage-filter-count {
  background: var(--lfn-navy);
  color: #ffffff;
  box-shadow: none;
}

.crm-lead-list {
  min-height: 0;
  align-content: start;
  border-color: #d8e3ee;
  background: #ffffff;
}

.crm-lead-list .lead-row {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.08fr) minmax(104px, 0.62fr) minmax(96px, 0.5fr);
  gap: 12px;
  padding: 0 12px;
}

.crm-lead-list .lead-row-head {
  min-height: 42px;
  background: #f8fbfd;
  color: #617087;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
}

.crm-lead-list .lead-row.lead-row-head strong {
  color: #617087;
  font-size: 0.74rem;
  line-height: 1;
  overflow-wrap: normal;
  white-space: nowrap;
}

.crm-lead-list .lead-row-button {
  min-height: 76px;
  padding-block: 12px;
  transition:
    background 150ms ease,
    box-shadow 150ms ease;
}

.crm-lead-list .lead-row-button:hover {
  background: #fbfdff;
  box-shadow: inset 3px 0 0 #c9a84e;
}

.crm-lead-list .lead-row div {
  gap: 4px;
}

.crm-lead-list .lead-row div > strong,
.crm-lead-list .lead-row div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-lead-list .lead-row strong {
  color: #10213a;
  font-size: 0.94rem;
  line-height: 1.18;
}

.crm-lead-list .lead-row span,
.crm-lead-list .lead-row em {
  font-size: 0.84rem;
  line-height: 1.25;
}

.crm-lead-list .lead-row > span:not(.lead-score) {
  color: #4b5c74;
  font-weight: 800;
}

.crm-lead-list .lead-row > em {
  justify-self: start;
  min-height: 28px;
  padding: 0 10px;
  background: #eef7f2;
  color: #17633f;
  font-size: 0.8rem;
}

.crm-empty-panel {
  min-height: 270px;
  gap: 10px;
  padding: 34px 28px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(0deg, rgba(7, 48, 79, 0.025) 0 1px, transparent 1px 8px);
}

.crm-empty-panel > span {
  width: 52px;
  height: 52px;
  border: 1px solid #dce9f5;
  background: #eef7ff;
  font-size: 1.18rem;
}

.crm-empty-panel strong {
  font-size: 1.2rem;
  line-height: 1.15;
}

.crm-empty-panel p {
  max-width: 520px;
  font-size: 0.96rem;
}

@media (max-width: 980px) {
  .crm-lead-list .lead-row {
    grid-template-columns: minmax(220px, 1.15fr) minmax(210px, 1.05fr) minmax(120px, 0.72fr) minmax(110px, 0.55fr);
  }
}

@media (max-width: 680px) {
  #pipeline.white-card {
    padding: 16px;
  }

  #pipeline .card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .crm-stage-strip {
    grid-template-columns: repeat(5, minmax(116px, 1fr));
    margin-right: -16px;
    overflow-x: auto;
    padding: 0 16px 4px 0;
  }

  .crm-lead-list .lead-row,
  .crm-lead-list .lead-row-head {
    grid-template-columns: 1fr;
  }

  .crm-lead-list .lead-row-head {
    display: none;
  }

  .crm-lead-list .lead-row-button {
    gap: 8px;
    min-height: 0;
    padding: 14px;
  }
}

/* Backend mobile QA fixes */
.modern-upload strong,
.modern-upload small,
.home-photo-upload strong,
.home-photo-upload small {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 760px) {
  .calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-filter-controls {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }

  .calendar-filter-controls select {
    margin-top: 0;
  }

  .listing-inventory-header {
    align-items: stretch;
    flex-direction: column;
  }

  .listing-primary-actions,
  .listing-filter-tabs {
    width: 100%;
  }

  .listing-filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 680px) {
  .crm-detail-shell {
    grid-template-columns: 1fr;
  }

  .crm-profile-head {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .crm-profile-head .lead-score {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .crm-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-detail-form {
    grid-template-columns: 1fr;
  }

  .crm-delete-action {
    margin-left: 0;
  }

  .crm-stage-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-right: 0;
    overflow-x: visible;
    padding: 0;
  }

  .crm-stage-strip button {
    min-width: 0;
    white-space: normal;
  }
}

/* CRM command center */
.crm-command-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  padding: clamp(18px, 2.6vw, 26px);
  background: linear-gradient(135deg, #ffffff 0%, #f6fbf8 52%, #fff8e9 100%);
  box-shadow: 0 18px 44px rgba(17, 39, 65, 0.075);
}

.agent-crm-view .crm-command-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.36fr);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f6fbf8 52%, #fff8e9 100%);
}

.crm-hero-copy {
  display: grid;
  align-content: center;
  min-width: 0;
}

.crm-command-hero .eyebrow {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crm-command-hero h2 {
  max-width: 820px;
  color: var(--lfn-text);
  font-size: clamp(1.72rem, 3vw, 2.82rem);
  line-height: 1.03;
}

.crm-command-hero p {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--lfn-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.crm-hero-dashboard {
  display: grid;
  align-content: center;
  min-width: 0;
}

.crm-hero-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 0;
}

.crm-hero-metrics article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 66px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.crm-hero-metrics strong {
  color: var(--lfn-navy);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1;
}

.crm-hero-metrics span {
  color: var(--lfn-muted);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.crm-layout {
  align-items: start;
}

.crm-smartlists {
  display: grid;
  grid-template-columns: repeat(6, minmax(126px, 1fr));
  gap: 10px;
  margin: -4px 0 18px;
}

.crm-lifecycle-strip {
  margin-bottom: 10px;
}

.crm-lifecycle-strip button.active {
  border-color: #b8dcca;
  background: #eef9f3;
  color: #17633f;
}

.crm-lifecycle-strip button.active .stage-filter-count {
  background: #17633f;
}

.crm-smartlists button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdff;
  color: var(--lfn-text);
  text-align: left;
  cursor: pointer;
}

.crm-smartlists button:hover {
  border-color: #c9d7e6;
  background: #f8fbff;
}

.crm-smartlists button.active {
  border-color: #c8a84f;
  background: #fffaf0;
  box-shadow: inset 0 0 0 1px rgba(198, 162, 71, 0.2);
}

.crm-smartlists span {
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crm-smartlists strong {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-size: 0.95rem;
}

.crm-card-note {
  margin-top: 4px;
  color: var(--lfn-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.crm-page .crm-command {
  align-items: end;
  border-color: #d7e2ef;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.98)),
    #ffffff;
  box-shadow: 0 14px 34px rgba(20, 38, 63, 0.065);
}

.crm-page .crm-search span {
  color: #586981;
  letter-spacing: 0.07em;
}

.crm-page .crm-search input {
  border-color: #d8e3ee;
  background: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
}

.crm-view-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.1fr) minmax(0, 0.82fr);
  gap: 8px;
  border-bottom: 1px solid #edf1f6;
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, #fbfdff, #f8fbfd);
}

.crm-view-summary article {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  border: 1px solid #e0e9f2;
  border-radius: 8px;
  min-height: 74px;
  padding: 10px 12px;
  background: #ffffff;
}

.crm-view-summary span,
.crm-view-summary small {
  display: block;
  min-width: 0;
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
}

.crm-view-summary span {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.crm-view-summary strong {
  overflow: hidden;
  color: var(--lfn-navy);
  font-size: 1.02rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-page .crm-lead-list {
  min-height: 0;
}

.crm-page .crm-lead-list .lead-row {
  grid-template-columns:
    minmax(120px, 1fr)
    minmax(128px, 1.05fr)
    minmax(54px, 0.34fr)
    minmax(112px, 0.74fr)
    minmax(84px, 0.5fr)
    minmax(70px, 0.34fr);
  column-gap: 8px;
  padding-right: 10px;
  padding-left: 10px;
}

.crm-page .crm-lead-list .lead-row-button {
  min-height: 76px;
  background: #ffffff;
}

.crm-page .crm-lead-list .lead-row-button:hover {
  background: linear-gradient(90deg, #fbfdff, #f7fbff);
}

.lead-owner-cell,
.lead-follow-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lead-owner-cell strong,
.lead-owner-cell small,
.lead-follow-cell em,
.lead-follow-cell small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lead-owner-cell strong {
  color: var(--lfn-text);
  font-size: 0.86rem;
  font-style: normal;
  font-weight: 950;
}

.lead-owner-cell small,
.lead-follow-cell small {
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.lead-follow-cell em {
  width: fit-content;
  min-width: 58px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eaf8f1;
  color: #17633f;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.lead-open-cell {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.lead-open-button {
  min-width: 64px;
  min-height: 34px;
  border: 1px solid #d6e1ec;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.lead-row-button:hover .lead-open-button,
.lead-open-button:hover {
  border-color: var(--lfn-navy);
  background: var(--lfn-navy);
  color: #ffffff;
}

.lead-score {
  display: grid;
  place-items: center;
  justify-self: start;
  min-width: 54px;
  min-height: 46px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 6px 7px;
  background: #f8fbff;
  color: var(--lfn-navy);
}

.lead-row .lead-score {
  min-width: 54px;
}

.lead-score strong {
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}

.lead-score small {
  color: inherit;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.lead-score.hot {
  border-color: #f1d09a;
  background: #fff3e4;
  color: #9a5c0e;
}

.lead-score.priority {
  border-color: #b9d8ca;
  background: #eaf8f1;
  color: #17633f;
}

.lead-score.nurture {
  border-color: #d9ddf1;
  background: #f1f4ff;
  color: #33467c;
}

.lead-score.won {
  border-color: #d6c27e;
  background: #fff9df;
  color: #7d5e12;
}

.crm-desk-stack,
.crm-insight-list,
.crm-conversation-list {
  display: grid;
  gap: 10px;
}

.crm-desk-stack > section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.crm-desk-stack > section + section {
  border-top: 1px solid #edf1f6;
  padding-top: 12px;
}

.crm-desk-stack h3 {
  color: var(--lfn-muted);
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.crm-daily-card .inline-empty {
  min-height: 118px;
  padding: 16px;
}

.crm-daily-card .inline-empty span {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

.crm-daily-card .inline-empty p {
  max-width: 280px;
  font-size: 0.86rem;
}

.crm-insight-list article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.crm-insight-list article.crm-insight-empty {
  grid-template-columns: 1fr;
}

.crm-insight-marker {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #dce8f2;
  border-radius: 8px;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-size: 0.95rem;
  font-weight: 950;
}

.crm-insight-list article[data-insight-tone="urgent"] .crm-insight-marker,
.crm-insight-list article[data-insight-tone="hot"] .crm-insight-marker {
  border-color: #efd19c;
  background: #fff3df;
  color: #9a5c0e;
}

.crm-insight-list article[data-insight-tone="covered"] .crm-insight-marker {
  border-color: #b8dcca;
  background: #eaf8f1;
  color: #17633f;
}

.crm-insight-list div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.crm-insight-list div strong,
.crm-insight-list div span {
  display: block;
  min-width: 0;
}

.crm-insight-list strong {
  color: var(--lfn-text);
  font-size: 0.94rem;
  line-height: 1.2;
}

.crm-insight-list div span {
  color: var(--lfn-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.crm-insight-list button,
.crm-insight-list a,
.crm-conversation nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.crm-insight-list button:hover,
.crm-insight-list a:hover,
.crm-conversation nav a:hover {
  border-color: #b9cce0;
  background: #eef5fb;
}

.crm-conversation {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
}

.crm-conversation > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #edf5fb;
  color: var(--lfn-navy);
  font-weight: 950;
}

.crm-conversation div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.crm-conversation strong,
.crm-conversation small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-conversation strong {
  color: var(--lfn-text);
  font-size: 0.92rem;
}

.crm-conversation small {
  color: var(--lfn-muted);
  font-size: 0.78rem;
}

.crm-conversation nav {
  display: flex;
  gap: 6px;
}

.automation-list button {
  cursor: pointer;
}

@media (max-width: 1180px) {
  .crm-command-hero {
    grid-template-columns: 1fr;
  }

  .agent-crm-view .crm-command-hero {
    grid-template-columns: 1fr;
  }

  .crm-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .crm-hero-metrics article {
    grid-template-columns: 1fr;
  }

  .crm-smartlists {
    grid-template-columns: repeat(6, minmax(126px, 1fr));
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .crm-lead-list .lead-row {
    grid-template-columns: minmax(220px, 1.1fr) minmax(230px, 1.05fr) minmax(92px, 0.42fr) minmax(150px, 0.7fr) minmax(112px, 0.5fr);
  }

  .crm-page .crm-lead-list .lead-row {
    grid-template-columns:
      minmax(120px, 1fr)
      minmax(128px, 1.05fr)
      minmax(54px, 0.34fr)
      minmax(112px, 0.74fr)
      minmax(84px, 0.5fr)
      minmax(70px, 0.34fr);
  }
}

@media (max-width: 760px) {
  .crm-command-hero {
    padding: 16px;
  }

  .crm-hero-metrics {
    grid-template-columns: 1fr;
  }

  .crm-smartlists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .crm-lead-list .lead-row,
  .crm-lead-list .lead-row-head {
    grid-template-columns: 1fr;
  }

  .crm-view-summary,
  .crm-page .crm-lead-list .lead-row,
  .crm-page .crm-lead-list .lead-row-head {
    grid-template-columns: 1fr;
  }

  .crm-view-summary {
    padding: 10px;
  }

  .lead-score {
    grid-template-columns: auto auto;
    gap: 5px;
    justify-self: start;
    min-height: 34px;
  }

  .crm-insight-list article,
  .crm-conversation {
    grid-template-columns: 1fr;
  }

  .crm-insight-marker {
    display: none;
  }

  .lead-open-cell {
    justify-content: stretch;
  }

  .lead-open-button {
    width: 100%;
  }

  .crm-conversation > span {
    display: none;
  }

  .crm-conversation nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .crm-page {
    overflow-x: hidden;
  }

  .crm-page .lfn-dashboard,
  .crm-page .lfn-sidebar,
  .crm-page .lfn-main,
  .crm-page .crm-command-hero,
  .crm-page .crm-command,
  .crm-page .crm-smartlists,
  .crm-page .crm-layout {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .crm-page .lfn-main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .crm-page .lfn-dashboard .lfn-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-page .lfn-dashboard .lfn-topbar > div:first-child,
  .crm-page .lfn-dashboard .lfn-topbar p,
  .crm-page .crm-command-hero h2,
  .crm-page .crm-command-hero p {
    max-width: 100%;
  }

  .crm-page .lfn-dashboard .topbar-actions {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }

  .crm-page .lfn-dashboard .bell-button {
    width: 48px;
  }

  .crm-page .lfn-dashboard .user-menu {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .crm-page .crm-command {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .crm-page .crm-command .top-link,
  .crm-page .crm-command .purple-button {
    width: 100%;
  }

  .crm-page .crm-smartlists {
    grid-template-columns: 1fr;
  }

  .crm-page .crm-stage-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .crm-page .lfn-nav {
    grid-template-columns: 1fr;
  }

  .crm-page .lfn-nav a {
    white-space: normal;
  }
}

@container (max-width: 760px) {
  #pipeline .crm-stage-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-right: 0;
    overflow: visible;
    padding: 0;
  }

  #pipeline .crm-lead-list .lead-row-head {
    display: none;
  }

  #pipeline .crm-lead-list .lead-row-button {
    grid-template-areas:
      "score contact action"
      "score opportunity action"
      "owner owner follow";
    grid-template-columns: 56px minmax(0, 1fr) 72px;
    gap: 8px 12px;
    align-items: center;
    min-height: 0;
    padding: 14px 12px;
  }

  #pipeline .crm-lead-list .lead-row-button > div:first-child {
    grid-area: contact;
  }

  #pipeline .crm-lead-list .lead-row-button > div:nth-of-type(2) {
    grid-area: opportunity;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-score {
    grid-area: score;
    align-self: start;
    justify-self: start;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-owner-cell {
    grid-area: owner;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-follow-cell {
    grid-area: follow;
    justify-self: end;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-follow-cell small {
    display: none;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-open-cell {
    grid-area: action;
    align-self: center;
  }
}

@container (max-width: 460px) {
  #pipeline .crm-stage-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Backend CRM alignment pass */
.lfn-dashboard {
  --backend-border: #dce6ef;
  --backend-soft: #f6fbf8;
  --backend-warm: #fff8e9;
  --backend-ink: #10213a;
  background:
    radial-gradient(circle at top right, rgba(7, 48, 79, 0.08), transparent 26rem),
    linear-gradient(180deg, #fbfdff 0%, #eef4f9 100%);
}

.lfn-dashboard .lfn-main {
  padding-top: 26px;
}

.lfn-dashboard .lfn-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  border: 1px solid var(--backend-border);
  border-radius: 8px;
  padding: clamp(18px, 2.4vw, 24px);
  background: linear-gradient(135deg, #ffffff 0%, var(--backend-soft) 52%, var(--backend-warm) 100%);
  box-shadow: 0 18px 44px rgba(17, 39, 65, 0.075);
}

.lfn-dashboard .lfn-topbar::after {
  content: none;
}

.lfn-dashboard .lfn-topbar > div:first-child {
  display: grid;
  gap: 8px;
}

.lfn-dashboard .lfn-topbar h1 {
  color: var(--backend-ink);
  font-size: clamp(1.72rem, 2.4vw, 2.55rem);
  line-height: 1.03;
}

.lfn-dashboard .lfn-topbar p {
  max-width: 760px;
  margin: 0;
  color: var(--lfn-muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

.lfn-dashboard .lfn-topbar .eyebrow {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #d8e2ee;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: var(--lfn-navy);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.lfn-dashboard .topbar-actions {
  align-items: center;
  justify-content: flex-end;
}

.lfn-dashboard .summary-cards,
.lfn-dashboard .deadline-alerts {
  gap: 10px;
  margin: 0 0 18px;
}

.lfn-dashboard .summary-cards {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.lfn-dashboard .dashboard-metric-card,
.lfn-dashboard .transaction-metric-card {
  min-height: 98px;
  border-color: #dfe8f1;
  border-radius: 8px;
  padding: 14px 48px 14px 14px;
  background: #fbfdff;
  box-shadow:
    0 12px 30px rgba(26, 43, 68, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lfn-dashboard .dashboard-metric-card:hover,
.lfn-dashboard .transaction-metric-card:hover,
.lfn-dashboard .crm-smartlists button:hover {
  border-color: #c9d7e6;
  background: #f8fbff;
}

.lfn-dashboard .dashboard-metric-card::before,
.lfn-dashboard .transaction-metric-card::before {
  content: none;
}

.lfn-dashboard .dashboard-metric-card .summary-icon,
.lfn-dashboard .transaction-metric-card .summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.lfn-dashboard .dashboard-metric-card .summary-icon svg,
.lfn-dashboard .transaction-metric-card .summary-icon svg {
  width: 24px;
  height: 24px;
}

.lfn-dashboard .dashboard-metric-card strong,
.lfn-dashboard .transaction-metric-card strong {
  color: var(--backend-ink);
  font-size: clamp(1.38rem, 1.7vw, 1.88rem);
}

.lfn-dashboard .dashboard-metric-card span:not(.summary-icon),
.lfn-dashboard .transaction-metric-card span:not(.summary-icon) {
  color: var(--lfn-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.lfn-dashboard .dashboard-metric-card a,
.lfn-dashboard .transaction-metric-card a {
  color: var(--lfn-navy);
}

.lfn-dashboard .dashboard-metric-card a::after,
.lfn-dashboard .transaction-metric-card a::after {
  right: 12px;
  width: 28px;
  height: 28px;
  font-size: 1rem;
}

.lfn-dashboard .white-card,
.lfn-dashboard .alert-card {
  border-color: #dfe8f1;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 253, 255, 0.98)),
    #ffffff;
  box-shadow:
    0 16px 38px rgba(26, 43, 68, 0.065),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lfn-dashboard .white-card:hover,
.lfn-dashboard .alert-card:hover {
  border-color: #cfdbe8;
}

.lfn-dashboard .card-header {
  align-items: flex-start;
  gap: 12px;
}

.lfn-dashboard .card-header h2,
.lfn-dashboard .card-header h3,
.lfn-dashboard .conversation-header h2 {
  color: var(--backend-ink);
  font-size: 1.02rem;
  line-height: 1.15;
}

.lfn-dashboard .card-header p,
.lfn-dashboard .conversation-header p {
  color: var(--lfn-muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.lfn-dashboard .muted-label,
.lfn-dashboard .message-count-pill,
.lfn-dashboard .status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid #dfe8f1;
  border-radius: 999px;
  padding: 0 10px;
  background: #f8fbff;
  color: var(--lfn-muted);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lfn-dashboard .modern-table,
.lfn-dashboard .financial-table,
.lfn-dashboard .lead-table,
.lfn-dashboard .listing-inventory,
.lfn-dashboard .inbox-list,
.lfn-dashboard .conversation-thread {
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.lfn-dashboard .modern-head,
.lfn-dashboard .financial-head,
.lfn-dashboard .lead-row-head,
.lfn-dashboard .document-list-head {
  min-height: 44px;
  background: linear-gradient(180deg, #fbfdff, #f5f9fd);
  color: #617087;
  letter-spacing: 0.05em;
}

.lfn-dashboard .modern-row,
.lfn-dashboard .financial-row,
.lfn-dashboard .table-row,
.lfn-dashboard .inbox-list button,
.lfn-dashboard .crm-conversation,
.lfn-dashboard .crm-insight-list article {
  border-color: #edf1f6;
}

.lfn-dashboard .empty-state,
.lfn-dashboard .inline-empty,
.lfn-dashboard .table-empty,
.lfn-dashboard .crm-empty-panel {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(0deg, rgba(7, 48, 79, 0.025) 0 1px, transparent 1px 8px);
}

.lfn-dashboard .empty-state > span,
.lfn-dashboard .inline-empty > span,
.lfn-dashboard .table-empty > span {
  border: 1px solid #dce9f5;
  background: #eef7ff;
  color: var(--lfn-navy);
}

.lfn-dashboard .calendar-toolbar.white-card,
.lfn-dashboard .marketing-hero-card {
  border: 1px solid var(--backend-border);
  background: linear-gradient(135deg, #ffffff 0%, var(--backend-soft) 52%, var(--backend-warm) 100%);
  box-shadow: 0 18px 44px rgba(17, 39, 65, 0.075);
}

.lfn-dashboard .campaign-snapshot article,
.lfn-dashboard .crm-hero-metrics article {
  background: rgba(255, 255, 255, 0.84);
}

.lfn-dashboard .field-checklist label,
.lfn-dashboard .settings-modern label,
.lfn-dashboard .automation-list button,
.lfn-dashboard .quick-links a,
.lfn-dashboard .client-property-filter {
  border-color: #dfe8f1;
  border-radius: 8px;
  background: #fbfdff;
}

.lfn-dashboard .field-checklist label:hover,
.lfn-dashboard .settings-modern label:hover,
.lfn-dashboard .automation-list button:hover,
.lfn-dashboard .quick-links a:hover,
.lfn-dashboard .client-property-filter:hover {
  border-color: #c9d7e6;
  background: #f8fbff;
}

.lfn-dashboard .agent-page-form input,
.lfn-dashboard .agent-page-form select,
.lfn-dashboard .agent-page-form textarea,
.lfn-dashboard .landing-builder-form input,
.lfn-dashboard .landing-builder-form select,
.lfn-dashboard .landing-builder-form textarea,
.lfn-dashboard .marketing-form input,
.lfn-dashboard .marketing-form select,
.lfn-dashboard .marketing-form textarea,
.lfn-dashboard .ai-marketing-form input,
.lfn-dashboard .ai-marketing-form select,
.lfn-dashboard .ai-marketing-form textarea,
.lfn-dashboard .reminder-form input,
.lfn-dashboard .reminder-form select,
.lfn-dashboard .reminder-form textarea,
.lfn-dashboard .reply-box input,
.lfn-dashboard .reply-box select,
.lfn-dashboard .reply-box textarea,
.lfn-dashboard .calendar-filter-controls select {
  border-color: #dbe5ef;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: var(--backend-ink);
}

.lfn-dashboard .agent-page-form input:focus,
.lfn-dashboard .agent-page-form select:focus,
.lfn-dashboard .agent-page-form textarea:focus,
.lfn-dashboard .landing-builder-form input:focus,
.lfn-dashboard .landing-builder-form select:focus,
.lfn-dashboard .landing-builder-form textarea:focus,
.lfn-dashboard .marketing-form input:focus,
.lfn-dashboard .marketing-form select:focus,
.lfn-dashboard .marketing-form textarea:focus,
.lfn-dashboard .ai-marketing-form input:focus,
.lfn-dashboard .ai-marketing-form select:focus,
.lfn-dashboard .ai-marketing-form textarea:focus,
.lfn-dashboard .reminder-form input:focus,
.lfn-dashboard .reminder-form select:focus,
.lfn-dashboard .reminder-form textarea:focus,
.lfn-dashboard .reply-box input:focus,
.lfn-dashboard .reply-box select:focus,
.lfn-dashboard .reply-box textarea:focus,
.lfn-dashboard .calendar-filter-controls select:focus {
  border-color: var(--lfn-navy);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.1);
  outline: 0;
}

.lfn-dashboard .listing-filter-tabs,
.lfn-dashboard .crm-stage-strip {
  gap: 8px;
}

.lfn-dashboard .listing-filter-tabs button,
.lfn-dashboard .crm-stage-strip button {
  border-radius: 8px;
}

@media (max-width: 1060px) {
  .lfn-dashboard .lfn-topbar {
    grid-template-columns: 1fr;
  }

  .lfn-dashboard .topbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .lfn-dashboard .lfn-topbar {
    padding: 16px;
  }

  .lfn-dashboard .topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .lfn-dashboard .bell-button {
    width: 48px;
  }

  .lfn-dashboard .user-menu {
    width: 100%;
    max-width: none;
  }

  .lfn-dashboard .summary-cards,
  .lfn-dashboard .deadline-alerts {
    grid-template-columns: 1fr;
  }

  .lfn-dashboard .dashboard-metric-card,
  .lfn-dashboard .transaction-metric-card {
    grid-template-columns: 48px minmax(0, 1fr);
    padding-right: 44px;
  }
}

.crm-page .lfn-dashboard .lfn-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  border: 0;
  border-bottom: 1px solid rgba(211, 221, 236, 0.9);
  border-radius: 0;
  padding: 2px 0 24px;
  background: transparent;
  box-shadow: none;
}

.crm-page .lfn-dashboard .lfn-topbar::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--lfn-gold), rgba(198, 162, 71, 0));
}

@media (max-width: 760px) {
  .crm-page .lfn-dashboard .lfn-topbar {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Dashboard Daily Desk */
.lfn-dashboard .dashboard-daily-desk-card {
  grid-column: 1 / -1;
}

.lfn-dashboard .dashboard-daily-desk-card .card-header {
  align-items: center;
}

.lfn-dashboard .dashboard-daily-desk-card .card-header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lfn-dashboard .dashboard-daily-desk-link {
  text-decoration: none;
  white-space: nowrap;
}

.lfn-dashboard .dashboard-daily-desk-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: start;
  gap: 16px;
}

.lfn-dashboard .dashboard-daily-desk-grid > section + section {
  border-top: 0;
  border-left: 1px solid #edf1f6;
  padding-top: 0;
  padding-left: 16px;
}

.lfn-dashboard .dashboard-daily-desk-card .crm-task-list,
.lfn-dashboard .dashboard-daily-desk-card .crm-conversation-list {
  gap: 8px;
}

.lfn-dashboard .dashboard-daily-desk-card .crm-task,
.lfn-dashboard .dashboard-daily-desk-card .crm-conversation {
  min-height: 62px;
}

.lfn-dashboard .dashboard-daily-desk-card .inline-empty {
  min-height: 132px;
}

@media (max-width: 920px) {
  .lfn-dashboard .dashboard-daily-desk-grid {
    grid-template-columns: 1fr;
  }

  .lfn-dashboard .dashboard-daily-desk-grid > section + section {
    border-top: 1px solid #edf1f6;
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .lfn-dashboard .dashboard-daily-desk-card .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .lfn-dashboard .dashboard-daily-desk-link {
    width: fit-content;
  }
}

/* CRM lead workspace refinement */
#pipeline.white-card {
  border-color: #d7e5ee;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 253, 0.99)),
    #ffffff;
  box-shadow:
    0 18px 42px rgba(17, 39, 65, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

#pipeline .card-header {
  align-items: flex-start;
  margin-bottom: 16px;
}

#pipeline .card-header h2 {
  color: var(--backend-ink);
  font-size: 1.08rem;
  letter-spacing: 0;
}

#pipeline .card-header p {
  color: #53677f;
  font-size: 0.9rem;
  font-weight: 750;
}

#pipeline .card-header .top-link {
  min-height: 36px;
  border-color: #d2e1eb;
  padding: 0 13px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: var(--backend-ink);
  box-shadow: 0 8px 18px rgba(17, 39, 65, 0.045);
}

#pipeline .card-header .top-link:hover {
  border-color: #b8cfde;
  background: #f4f9fc;
}

#pipeline .crm-stage-strip {
  gap: 8px;
  margin-bottom: 14px;
}

#pipeline .crm-stage-strip button {
  min-height: 40px;
  border-color: #d5e3ec;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f6f9fc);
  color: #495d76;
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 7px 16px rgba(17, 39, 65, 0.035);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease;
}

#pipeline .crm-stage-strip button:hover {
  border-color: #bdd3e1;
  background: #f8fbfd;
  color: var(--backend-ink);
}

#pipeline .crm-stage-strip button.active {
  border-color: #add0e3;
  background: linear-gradient(180deg, #eff8ff, #e8f3fb);
  color: var(--backend-ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 10px 22px rgba(31, 91, 132, 0.08);
}

#pipeline .crm-stage-strip button .stage-filter-count {
  width: auto;
  min-width: 21px;
  height: 21px;
  border: 1px solid #d5e3ec;
  background: #ffffff;
  color: #516780;
  font-size: 0.73rem;
  box-shadow: none;
}

#pipeline .crm-stage-strip button.active .stage-filter-count {
  border-color: var(--backend-ink);
  background: var(--backend-ink);
  color: #ffffff;
}

#pipeline .crm-lead-list {
  gap: 10px;
  border-color: #d8e6ee;
  padding: 10px;
  background: linear-gradient(180deg, #f8fbfd, #f4f8fb);
}

#pipeline .crm-view-summary {
  gap: 8px;
  border-bottom: 0;
  padding: 0;
  background: transparent;
}

#pipeline .crm-view-summary article {
  min-height: 72px;
  border-color: #d8e6ee;
  padding: 11px 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 253, 255, 0.98)),
    #ffffff;
  box-shadow: 0 8px 18px rgba(17, 39, 65, 0.035);
}

#pipeline .crm-view-summary span {
  color: #62758d;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

#pipeline .crm-view-summary strong {
  color: var(--backend-ink);
  font-size: 1rem;
  font-weight: 950;
}

#pipeline .crm-view-summary small {
  color: #5d6f84;
  font-size: 0.76rem;
  font-weight: 850;
}

#pipeline .crm-lead-list .lead-row-head {
  border: 1px solid #e0e9f2;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f5f9fc);
}

#pipeline .crm-lead-list .lead-row-button {
  grid-template-columns:
    minmax(130px, 1.04fr)
    minmax(140px, 1.12fr)
    minmax(56px, 0.34fr)
    minmax(116px, 0.78fr)
    minmax(88px, 0.5fr)
    minmax(70px, 0.34fr);
  column-gap: 10px;
  min-height: 82px;
  border: 1px solid #dce8f0;
  border-radius: 8px;
  padding: 13px 12px;
  background: #ffffff;
  box-shadow:
    0 8px 20px rgba(17, 39, 65, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

#pipeline .crm-lead-list .lead-row-button:hover {
  border-color: #c8dce8;
  background: linear-gradient(90deg, #ffffff, #f8fbfd);
  box-shadow:
    0 12px 24px rgba(17, 39, 65, 0.055),
    inset 3px 0 0 #10273f;
}

#pipeline .crm-lead-list .lead-row-button div > strong {
  color: var(--backend-ink);
  font-size: 0.96rem;
  line-height: 1.15;
}

#pipeline .crm-lead-list .lead-row-button div > span,
#pipeline .lead-owner-cell small,
#pipeline .lead-follow-cell small {
  color: #5c6f86;
  font-size: 0.78rem;
  font-weight: 750;
}

#pipeline .lead-owner-cell strong {
  color: var(--backend-ink);
  font-size: 0.86rem;
}

#pipeline .lead-follow-cell em {
  border: 1px solid rgba(47, 125, 79, 0.16);
  padding: 6px 11px;
  background: #ecf8f1;
  color: #24714b;
  letter-spacing: 0.02em;
}

#pipeline .lead-score {
  min-width: 54px;
  min-height: 46px;
  border-color: #d9e5ee;
  background: #f8fbfd;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#pipeline .lead-score.hot {
  border-color: #edc78b;
  background: linear-gradient(180deg, #fff8ee, #fff1df);
  color: #8e5511;
}

#pipeline .lead-score strong {
  font-size: 1rem;
}

#pipeline .lead-score small {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}

#pipeline .lead-open-cell {
  align-items: center;
}

#pipeline .lead-open-button {
  min-width: 64px;
  min-height: 34px;
  border-color: #cfe0ea;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  color: var(--backend-ink);
  box-shadow: 0 6px 14px rgba(17, 39, 65, 0.04);
}

#pipeline .lead-row-button:hover .lead-open-button,
#pipeline .lead-open-button:hover {
  border-color: var(--backend-ink);
  background: var(--backend-ink);
  color: #ffffff;
}

@container (max-width: 760px) {
  #pipeline.white-card {
    padding: 20px;
  }

  #pipeline .card-header {
    align-items: flex-start;
    gap: 10px;
  }

  #pipeline .crm-stage-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #pipeline .crm-view-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #pipeline .crm-view-summary article {
    min-height: 74px;
    padding: 11px 12px;
  }

  #pipeline .crm-lead-list .lead-row-button {
    grid-template-areas:
      "score contact action"
      "score opportunity action"
      "owner owner follow";
    grid-template-columns: 58px minmax(0, 1fr) 66px;
    gap: 8px 11px;
    align-items: center;
    padding: 14px 12px;
  }

  #pipeline .crm-lead-list .lead-row-button > div:first-child {
    grid-area: contact;
  }

  #pipeline .crm-lead-list .lead-row-button > div:nth-of-type(2) {
    grid-area: opportunity;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-score {
    grid-area: score;
    align-self: start;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-owner-cell {
    grid-area: owner;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-follow-cell {
    grid-area: follow;
    justify-self: end;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-follow-cell small {
    display: none;
  }

  #pipeline .crm-lead-list .lead-row-button .lead-open-cell {
    grid-area: action;
    align-self: start;
    justify-content: flex-end;
  }
}

@container (max-width: 520px) {
  #pipeline.white-card {
    padding: 16px;
  }

  #pipeline .card-header {
    flex-direction: column;
  }

  #pipeline .card-header .top-link {
    width: 100%;
  }

  #pipeline .crm-stage-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #pipeline .crm-view-summary {
    grid-template-columns: 1fr;
  }

  #pipeline .crm-lead-list .lead-row-button {
    grid-template-areas:
      "score contact"
      "score opportunity"
      "owner owner"
      "follow action";
    grid-template-columns: 58px minmax(0, 1fr);
  }

  #pipeline .crm-lead-list .lead-row-button .lead-follow-cell {
    justify-self: start;
  }
}

/* Admin agent theme polish */
body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard {
  --agent-admin-ink: #10273f;
  --agent-admin-muted: #536f85;
  --agent-admin-line: #d9e8f0;
  --agent-admin-cloud: #f6fafc;
  --agent-admin-water: #6fa4c8;
  --agent-admin-coral: #10273f;
  --agent-admin-leaf: #2f7d4f;
  --lfn-navy: var(--agent-admin-ink);
  --lfn-navy-2: #183a5b;
  --lfn-gold: var(--agent-admin-coral);
  --lfn-gold-2: #d9e8f0;
  --lfn-purple: #1f5b84;
  --lfn-bg: #f4f8fb;
  --lfn-text: var(--agent-admin-ink);
  --lfn-muted: var(--agent-admin-muted);
  --lfn-line: var(--agent-admin-line);
  --backend-border: var(--agent-admin-line);
  --backend-ink: var(--agent-admin-ink);
  --backend-soft: var(--agent-admin-cloud);
  --backend-warm: #fff5f1;
  background:
    radial-gradient(circle at top right, rgba(111, 164, 200, 0.2), transparent 28rem),
    linear-gradient(180deg, #fbfdff 0%, #f2f7fa 100%);
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .lfn-topbar {
  position: relative;
  overflow: hidden;
  border-color: rgba(217, 232, 240, 0.95);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 252, 0.98) 58%, rgba(255, 245, 241, 0.98) 100%);
  box-shadow: 0 18px 44px rgba(16, 39, 63, 0.08);
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .lfn-topbar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--agent-admin-coral), var(--agent-admin-water));
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .lfn-topbar > * {
  position: relative;
  z-index: 1;
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .lfn-topbar h1 {
  color: var(--agent-admin-ink);
  letter-spacing: 0;
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .lfn-topbar p {
  color: var(--agent-admin-muted);
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .user-menu {
  border-color: rgba(217, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(16, 39, 63, 0.06);
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .purple-button,
body.admin-agent-profile-page .profile-primary-action {
  background: linear-gradient(135deg, var(--agent-admin-ink), #1f5b84);
  box-shadow: 0 14px 28px rgba(16, 39, 63, 0.18);
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .purple-button:hover,
body.admin-agent-profile-page .profile-primary-action:hover {
  background: linear-gradient(135deg, #183a5b, #26719f);
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .outline-purple,
body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .top-link {
  border-color: #cfe1eb;
  background: #ffffff;
  color: var(--agent-admin-ink);
  box-shadow: none;
}

body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .outline-purple:hover,
body:is(.admin-agents-page, .admin-settings-page, .admin-agent-profile-page) .lfn-dashboard .top-link:hover {
  border-color: var(--agent-admin-water);
  background: var(--agent-admin-cloud);
}

body.admin-agents-page .agents-roster-card,
body.admin-settings-page .add-agent-card,
body.admin-settings-page .settings-agent-roster-card,
body.admin-agent-profile-page .agent-profile-card {
  border-color: rgba(217, 232, 240, 0.95);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(251, 253, 254, 0.99)),
    #ffffff;
  box-shadow:
    0 18px 46px rgba(16, 39, 63, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.admin-settings-page .add-agent-card,
body.admin-agents-page .agents-roster-card,
body.admin-agent-profile-page .agent-profile-card {
  position: relative;
}

body.admin-settings-page .add-agent-card::before,
body.admin-agent-profile-page .agent-profile-card::before,
body.admin-agents-page .agents-roster-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--agent-admin-coral), var(--agent-admin-water), var(--agent-admin-leaf));
}

body.admin-settings-page .add-agent-card .card-header,
body.admin-agents-page .agents-roster-card .card-header,
body.admin-settings-page .settings-agent-roster-card .card-header {
  align-items: center;
  border-bottom: 1px solid var(--agent-admin-line);
  padding-bottom: 16px;
}

body.admin-settings-page .settings-agent-roster-card .card-header > div:first-child,
body.admin-settings-page .settings-add-agent-panel .card-header > div:first-child {
  display: grid;
  gap: 5px;
  min-width: 0;
}

body.admin-settings-page .settings-team-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

body.admin-settings-page .settings-add-agent-panel {
  grid-column: 1 / -1;
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-shell {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  overflow-x: auto;
}

body:is(.admin-agents-page, .admin-settings-page) .agent-table-list {
  min-width: 780px;
  gap: 0;
  border: 1px solid var(--agent-admin-line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

body.admin-settings-page .agent-table-list {
  min-width: 720px;
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-head {
  border-bottom: 1px solid var(--agent-admin-line);
  padding: 13px 16px;
  background: linear-gradient(180deg, #fbfdff, var(--agent-admin-cloud));
  color: var(--agent-admin-muted);
  letter-spacing: 0.08em;
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-row {
  min-height: 78px;
  margin-top: 0;
  border-top: 1px solid #e7f0f5;
  border-radius: 0;
  padding: 14px 16px;
  background: #ffffff;
  text-decoration: none;
  box-shadow: none;
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-row:hover {
  background: linear-gradient(90deg, rgba(246, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
  box-shadow: inset 4px 0 0 var(--agent-admin-coral);
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-row .agent-avatar {
  width: 52px;
  height: 52px;
  border: 1px solid #cfe1eb;
  background: linear-gradient(135deg, var(--agent-admin-ink), #1f5b84);
  box-shadow: 0 10px 22px rgba(16, 39, 63, 0.13);
  color: #ffffff;
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-info > strong {
  color: var(--agent-admin-ink);
  font-size: 1.04rem;
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-info small,
body:is(.admin-agents-page, .admin-settings-page) .agent-roster-contact,
body:is(.admin-agents-page, .admin-settings-page) .agent-roster-phone {
  color: var(--agent-admin-muted);
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-phone {
  color: var(--agent-admin-ink);
}

body:is(.admin-agents-page, .admin-settings-page) .agent-split-pill,
body:is(.admin-agents-page, .admin-settings-page) .agent-expiration {
  border-color: #cfe1eb;
  border-radius: 999px;
  background: var(--agent-admin-cloud);
  color: var(--agent-admin-ink);
}

body:is(.admin-agents-page, .admin-settings-page) .agent-roster-row > em {
  border: 1px solid rgba(47, 125, 79, 0.24);
  border-radius: 999px;
  background: #ecf8f1;
  color: var(--agent-admin-leaf);
}

body.admin-settings-page .add-agent-card .agent-page-form {
  gap: 18px;
}

body.admin-settings-page .agent-form-heading {
  margin: 10px 0 0;
  padding-top: 18px;
  border-top-color: var(--agent-admin-line);
  color: var(--agent-admin-coral);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}

body.admin-settings-page .agent-form-grid {
  gap: 14px;
}

body.admin-settings-page .agent-page-form label,
body.admin-agent-profile-page .agent-page-form label {
  color: var(--agent-admin-muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
}

body.admin-settings-page .agent-page-form input,
body.admin-settings-page .agent-page-form select,
body.admin-settings-page .agent-page-form textarea,
body.admin-agent-profile-page .agent-page-form input,
body.admin-agent-profile-page .agent-page-form select,
body.admin-agent-profile-page .agent-page-form textarea {
  min-height: 48px;
  border-color: #cfe1eb;
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
  color: var(--agent-admin-ink);
}

body.admin-settings-page .agent-page-form input:focus,
body.admin-settings-page .agent-page-form select:focus,
body.admin-settings-page .agent-page-form textarea:focus,
body.admin-agent-profile-page .agent-page-form input:focus,
body.admin-agent-profile-page .agent-page-form select:focus,
body.admin-agent-profile-page .agent-page-form textarea:focus {
  border-color: var(--agent-admin-water);
  box-shadow: 0 0 0 3px rgba(111, 164, 200, 0.16);
}

body.admin-settings-page .agent-inline-headshot,
body.admin-agent-profile-page .agent-headshot-control {
  border: 1px solid var(--agent-admin-line);
  border-radius: 8px;
  padding: 12px;
  background: var(--agent-admin-cloud);
}

body.admin-settings-page .agent-inline-headshot-control {
  min-height: 50px;
}

body.admin-settings-page .agent-headshot-preview,
body.admin-agent-profile-page .profile-photo {
  border-color: #ffffff;
  background: linear-gradient(135deg, var(--agent-admin-ink), #1f5b84);
  box-shadow: 0 14px 28px rgba(16, 39, 63, 0.14);
}

body.admin-settings-page .agent-headshot-picker em {
  border-color: #cfe1eb;
  background: #ffffff;
  color: var(--agent-admin-ink);
}

body.admin-settings-page .form-actions {
  border-top: 1px solid var(--agent-admin-line);
  padding-top: 6px;
}

body.admin-agent-profile-page .profile-section-list,
body.admin-agent-profile-page .profile-edit-form {
  gap: 18px;
}

body.admin-agent-profile-page .profile-hero,
body.admin-agent-profile-page .profile-edit-header {
  border-color: var(--agent-admin-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 252, 0.99) 60%, rgba(255, 245, 241, 0.99)),
    #ffffff;
  box-shadow: 0 16px 38px rgba(16, 39, 63, 0.06);
}

body.admin-agent-profile-page .profile-photo {
  width: 108px;
  height: 108px;
}

body.admin-agent-profile-page .profile-kicker {
  color: var(--agent-admin-coral);
  letter-spacing: 0.16em;
}

body.admin-agent-profile-page .profile-status-pill {
  border: 1px solid rgba(47, 125, 79, 0.22);
  background: #ecf8f1;
  color: var(--agent-admin-leaf);
}

body.admin-agent-profile-page .profile-status-pill.pending {
  border-color: rgba(111, 164, 200, 0.34);
  background: #eef7fc;
  color: #1f5b84;
}

body.admin-agent-profile-page .profile-status-pill.inactive {
  border-color: #d7e1e8;
  background: #f2f5f7;
  color: var(--agent-admin-muted);
}

body.admin-agent-profile-page .profile-icon-action {
  border-color: #cfe1eb;
  background: #ffffff;
  color: var(--agent-admin-ink);
  box-shadow: 0 10px 22px rgba(16, 39, 63, 0.07);
}

body.admin-agent-profile-page .profile-icon-action:hover {
  border-color: var(--agent-admin-water);
  background: var(--agent-admin-cloud);
}

body.admin-agent-profile-page .agent-profile-stat,
body.admin-agent-profile-page .profile-detail-panel,
body.admin-agent-profile-page .profile-notes,
body.admin-agent-profile-page .profile-edit-section {
  border-color: var(--agent-admin-line);
  background: linear-gradient(180deg, #ffffff, #fbfdfe);
  box-shadow: 0 12px 30px rgba(16, 39, 63, 0.055);
}

body.admin-agent-profile-page .agent-profile-stat {
  min-height: 104px;
}

body.admin-agent-profile-page .agent-profile-stat span {
  color: var(--agent-admin-coral);
}

body.admin-agent-profile-page .agent-profile-stat strong,
body.admin-agent-profile-page .profile-field strong,
body.admin-agent-profile-page .profile-notes p,
body.admin-agent-profile-page .profile-edit-header h2,
body.admin-agent-profile-page .profile-edit-section h3 {
  color: var(--agent-admin-ink);
}

body.admin-agent-profile-page .profile-field {
  border-bottom-color: #e7f0f5;
}

body.admin-agent-profile-page .profile-field span,
body.admin-agent-profile-page .agent-profile-stat small,
body.admin-agent-profile-page .profile-edit-header p {
  color: var(--agent-admin-muted);
}

body.admin-agent-profile-page .profile-detail-group + .profile-detail-group {
  border-left-color: var(--agent-admin-line);
}

body.admin-agent-profile-page .agent-headshot-control .profile-photo {
  width: 72px;
  height: 72px;
}

@media (max-width: 820px) {
  body:is(.admin-agents-page, .admin-settings-page) .agent-table-list {
    min-width: 0;
  }

  body:is(.admin-agents-page, .admin-settings-page) .agent-roster-row {
    gap: 12px;
    padding: 16px;
  }

  body:is(.admin-agents-page, .admin-settings-page) .agent-roster-contact,
  body:is(.admin-agents-page, .admin-settings-page) .agent-roster-phone,
  body:is(.admin-agents-page, .admin-settings-page) .agent-split-pill,
  body:is(.admin-agents-page, .admin-settings-page) .agent-roster-row > em {
    justify-self: start;
    text-align: left;
    white-space: normal;
  }

  body.admin-settings-page .agent-inline-headshot-control {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  body.admin-settings-page .settings-agent-roster-card .card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.admin-settings-page .settings-team-card-actions {
    justify-content: flex-start;
    width: 100%;
  }

  body.admin-agent-profile-page .profile-photo {
    width: 100px;
    height: 100px;
  }
}

/* Transaction mobile polish */
@media (max-width: 760px) {
  .transactions-card {
    padding: 16px;
  }

  .transactions-card .modern-table,
  .broker-pending-table,
  #agentTransactionTable {
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .transactions-card .modern-row:not(.modern-head),
  .broker-pending-table .modern-row:not(.modern-head),
  #agentTransactionTable .modern-row:not(.modern-head) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    min-height: 0;
    border: 1px solid #dfe8f1;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 39, 65, 0.055);
  }

  .transactions-card .modern-row:not(.modern-head) > span,
  .broker-pending-table .modern-row:not(.modern-head) > span,
  #agentTransactionTable .modern-row:not(.modern-head) > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    overflow: visible;
    color: var(--backend-ink);
    font-size: 0.9rem;
    font-weight: 800;
    text-align: right;
    white-space: normal;
  }

  .transactions-card .modern-row:not(.modern-head) > span::before,
  .broker-pending-table .modern-row:not(.modern-head) > span::before,
  #agentTransactionTable .modern-row:not(.modern-head) > span::before {
    flex: 0 0 auto;
    color: var(--lfn-muted);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
  }

  .broker-pending-table .modern-row:not(.modern-head) > span:first-child,
  #agentTransactionTable .modern-row:not(.modern-head) > span:first-child {
    justify-content: flex-start;
    border-bottom: 1px solid #edf1f6;
    padding-bottom: 10px;
    text-align: left;
  }

  .broker-pending-table .modern-row:not(.modern-head) > span:first-child::before,
  #agentTransactionTable .modern-row:not(.modern-head) > span:first-child::before {
    content: none;
  }

  .transactions-card .modern-row:not(.modern-head) > span:first-child::before {
    content: "Close Date";
  }

  .transactions-card .modern-row:not(.modern-head) > .property-cell {
    justify-content: flex-start;
    border-bottom: 1px solid #edf1f6;
    padding-bottom: 10px;
    text-align: left;
  }

  .transactions-card .modern-row:not(.modern-head) > .property-cell::before {
    content: none;
  }

  .broker-pending-table .modern-row:not(.modern-head) > span:nth-child(2)::before {
    content: "Agent";
  }

  .transactions-card .modern-row:not(.modern-head) > span:nth-child(3)::before {
    content: "Agent";
  }

  .broker-pending-table .modern-row:not(.modern-head) > span:nth-child(3)::before {
    content: "Status";
  }

  .transactions-card .modern-row:not(.modern-head) > span:nth-child(4)::before {
    content: "Status";
  }

  .transactions-card .modern-row:not(.modern-head) > span:nth-child(5)::before {
    content: "Commission";
  }

  .broker-pending-table .modern-row:not(.modern-head) > span:nth-child(4)::before {
    content: "Close Date";
  }

  .broker-pending-table .modern-row:not(.modern-head) > span:nth-child(5)::before {
    content: "Commission";
  }

  #agentTransactionTable .modern-row:not(.modern-head) > span:nth-child(2)::before {
    content: "Status";
  }

  #agentTransactionTable .modern-row:not(.modern-head) > span:nth-child(3)::before {
    content: "Next Deadline";
  }

  #agentTransactionTable .modern-row:not(.modern-head) > span:nth-child(4)::before {
    content: "Close Date";
  }

  .transactions-card .property-cell,
  .broker-pending-table .property-cell,
  #agentTransactionTable .property-cell {
    align-items: center;
    gap: 12px;
  }

  .transactions-card .property-cell strong,
  .transactions-card .property-cell small,
  .broker-pending-table .property-cell strong,
  .broker-pending-table .property-cell small,
  #agentTransactionTable .property-cell strong,
  #agentTransactionTable .property-cell small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .transactions-card .property-thumb,
  .broker-pending-table .property-thumb {
    width: 56px;
    height: 48px;
  }

  .transaction-entry-card {
    padding: 16px;
  }

  .manual-entry-summary {
    grid-template-columns: 1fr;
  }

  .manual-entry-summary .purple-button {
    width: 100%;
  }

  .contract-autofill-disclosure summary {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }

  .contract-autofill-disclosure summary em {
    width: 100%;
  }

  .contract-autofill-body {
    padding: 16px;
  }

  .transaction-entry-form {
    gap: 14px;
  }

  .home-photo-upload {
    min-height: 168px;
    padding: 16px;
  }

  .scan-dropzone {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 0;
    padding: 18px;
    text-align: center;
  }

  .scan-dropzone strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .scan-dropzone small,
  .scan-dropzone em {
    grid-column: 1;
    grid-row: auto;
    max-width: 100%;
  }

  .scan-dropzone em {
    justify-self: stretch;
    text-align: center;
  }

  .entry-fields,
  .transaction-form-grid {
    gap: 10px;
  }

  .entry-fields .address-street-field,
  .entry-fields .address-city-field {
    grid-column: 1 / -1;
  }

  .entry-section-heading {
    align-items: start;
    flex-direction: column;
    gap: 4px;
  }

  .entry-section-heading span {
    max-width: 100%;
    text-align: left;
  }

  .entry-fields label span,
  .transaction-detail-form label span {
    line-height: 1.25;
  }

  .transaction-entry-form .form-actions,
  .transaction-detail-form .form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .transaction-entry-form .form-actions .purple-button,
  .transaction-entry-form .form-actions .outline-purple,
  .transaction-detail-form .form-actions .purple-button,
  .transaction-detail-form .form-actions .outline-purple {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .transactions-card,
  .transaction-entry-card,
  .transaction-edit-card,
  .transaction-documents-card {
    padding: 14px;
  }

  .transaction-action-buttons .purple-button,
  .transaction-action-buttons .top-link,
  .transaction-action-buttons .danger-action {
    min-height: 44px;
    padding-inline: 12px;
  }

  .scan-status article {
    padding: 10px;
  }
}

/* Broker property management */
.property-management-page .property-management-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
}

.property-management-list-card {
  grid-column: 1 / -1;
  grid-row: auto;
}

.property-management-form-card,
.property-management-watch-card,
.property-management-deposit-card {
  align-self: start;
}

.property-management-form-card[hidden] {
  display: none;
}

.property-management-lease-page .property-management-grid {
  grid-template-columns: minmax(0, 1fr);
}

.property-management-lease-page .property-management-editor-grid {
  max-width: 980px;
}

.property-management-lease-page .property-management-form-card {
  grid-column: 1 / -1;
}

.property-management-card-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.property-management-card-actions .compact-action {
  min-height: 38px;
  border-radius: 7px;
  padding: 0 14px;
  box-shadow: 0 10px 20px rgba(17, 39, 65, 0.12);
}

.property-management-tools {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.28fr) auto;
}

.property-management-tools select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 0 13px;
  background: #ffffff;
  color: var(--lfn-text);
  font-size: 0.95rem;
  font-weight: 800;
  outline: 0;
}

.property-management-tools select:focus {
  border-color: var(--lfn-navy);
  box-shadow: 0 0 0 3px rgba(7, 48, 79, 0.1);
}

.financials-card,
.check-receipt-card {
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.financials-card .card-header,
.check-receipt-card .card-header {
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid #e5edf5;
  padding-bottom: 14px;
}

.financials-card .card-header h2,
.check-receipt-card .card-header h2 {
  color: #132033;
}

.financials-card .transaction-card-actions {
  justify-content: flex-end;
}

.financials-card .transaction-card-actions .compact-action {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 14px;
}

.financial-table {
  border-color: #d8e4f0;
  background: #ffffff;
  box-shadow:
    0 10px 24px rgba(31, 45, 71, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.financial-row {
  gap: 12px;
  min-height: 60px;
  padding: 0 14px;
}

.transaction-financial-table .financial-row {
  grid-template-columns:
    minmax(218px, 1.5fr) minmax(140px, 0.88fr) minmax(82px, 0.5fr)
    minmax(58px, 0.34fr) minmax(82px, 0.5fr) minmax(78px, 0.46fr) minmax(118px, 0.64fr);
  gap: 10px;
}

.financial-head {
  min-height: 44px;
  background: linear-gradient(180deg, #f8fbfd 0%, #f2f7fb 100%);
  color: #63718a;
  letter-spacing: 0.06em;
}

.financial-row > span {
  min-width: 0;
}

.financial-row > span:nth-child(n + 3) {
  font-variant-numeric: tabular-nums;
}

.financial-row strong {
  color: #132033;
  line-height: 1.16;
}

.financial-row small {
  color: #56667f;
  font-size: 0.82rem;
  line-height: 1.25;
}

.commission-click-row {
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.commission-click-row:hover {
  background: #f7fbff;
  box-shadow: inset 3px 0 0 #0d6b9f;
}

.financial-row em {
  min-height: 28px;
  border: 1px solid transparent;
  padding: 0 10px;
  white-space: nowrap;
}

.financial-row em.due {
  border-color: #c9e3f5;
  background: #e8f5ff;
  color: #0d5f90;
}

.check-receipt-card {
  position: relative;
}

.check-receipt-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #0d6b9f 0%, #d7b755 100%);
}

.check-receipt-card .muted-label {
  border-color: #d5e2ee;
  background: #f7fbff;
  color: #52627a;
}

.commission-queue {
  gap: 10px;
}

.commission-queue-row {
  grid-template-columns: minmax(126px, max-content) minmax(0, 1.15fr) minmax(220px, 0.82fr) auto;
  gap: 16px;
  min-height: 74px;
  border-color: #d9e5f0;
  border-left-width: 3px;
  padding: 12px 14px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow:
    0 12px 24px rgba(17, 39, 65, 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.commission-queue-row:hover {
  border-color: #c9d8e6;
  background: #f8fcff;
  box-shadow: 0 14px 28px rgba(17, 39, 65, 0.07);
  transform: translateY(-1px);
}

.commission-queue-row.due {
  background:
    linear-gradient(90deg, rgba(13, 107, 159, 0.055) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.commission-queue-status {
  justify-self: start;
  min-width: 118px;
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

.commission-queue-detail-link strong {
  color: #132033;
}

.commission-queue-money {
  min-width: 0;
}

.commission-queue-money strong {
  color: #132033;
  font-size: 0.95rem;
  white-space: normal;
}

.commission-queue-money small {
  color: #56667f;
}

.commission-received-button {
  min-width: 88px;
  border-color: #b8cbe0;
  color: #0d3151;
}

.commission-received-button:hover {
  border-color: #0d3151;
  background: #0d3151;
  color: #ffffff;
}

@media (max-width: 820px) {
  .financials-card .card-header,
  .check-receipt-card .card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .financials-card .transaction-card-actions {
    justify-content: stretch;
    width: 100%;
    flex-wrap: wrap;
  }

  .financials-card .transaction-card-actions .compact-action {
    flex: 1 1 132px;
  }

  .financial-table {
    gap: 10px;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .financial-row,
  .transaction-financial-table .financial-row {
    min-height: auto;
    border: 1px solid #dfe8f0;
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
  }

  .financial-head {
    display: none;
  }

  .commission-click-row:hover {
    box-shadow: inset 3px 0 0 #0d6b9f;
  }

  .commission-queue-row {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
  }

  .commission-queue-status,
  .commission-received-button {
    width: 100%;
  }
}

.property-management-totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 14px;
}

.property-management-totals article {
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 14px;
  background: #fbfdff;
}

.property-management-totals span,
.property-management-totals small {
  display: block;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.property-management-totals strong {
  display: block;
  margin-top: 6px;
  color: var(--lfn-navy);
  font-size: 1.42rem;
  line-height: 1.1;
}

.property-management-totals small {
  margin-top: 5px;
  text-transform: none;
}

.property-management-table .modern-row {
  grid-template-columns: minmax(128px, 1.2fr) minmax(96px, 0.76fr) minmax(96px, 0.68fr) minmax(88px, 0.62fr) minmax(112px, 0.74fr);
  gap: 10px;
  padding: 0 14px;
}

.property-management-row {
  cursor: pointer;
}

.property-management-row:hover {
  background: #fbfdff;
}

.property-management-row .property-cell,
.property-management-row .property-tenant-cell,
.property-management-row > span:last-child {
  display: grid;
  gap: 4px;
}

.property-management-row strong,
.property-management-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-management-row small {
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.property-management-form .property-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.property-management-form .form-actions {
  align-items: center;
}

.property-management-form .form-actions .outline-purple,
.property-management-form .form-actions .danger-action {
  width: auto;
  margin-top: 0;
}

.property-management-form .form-actions .form-note {
  margin-left: 0;
}

.property-lease-pdf-field {
  display: grid;
  gap: 10px;
}

.property-lease-pdf-dropzone {
  min-height: 108px;
  margin: 0;
}

.property-lease-pdf-dropzone span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #dce9f5;
  border-radius: 8px;
  background: #eef7ff;
  color: var(--lfn-navy);
  font-size: 0.84rem;
  font-weight: 950;
}

.property-lease-pdf-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.property-lease-pdf-summary[hidden] {
  display: none;
}

.property-lease-pdf-summary > div:first-child {
  min-width: 0;
}

.property-lease-pdf-summary strong,
.property-lease-pdf-summary small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-lease-pdf-summary small {
  margin-top: 4px;
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.property-lease-pdf-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.property-lease-pdf-actions .outline-purple,
.property-lease-pdf-actions .danger-action {
  width: auto;
  margin-top: 0;
}

.property-watch-list,
.property-deposit-list {
  display: grid;
  gap: 10px;
}

.property-watch-item,
.property-deposit-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
  cursor: pointer;
}

.property-deposit-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

.property-watch-item:hover,
.property-deposit-item:hover {
  border-color: #c9d7e6;
  background: #f8fbff;
}

.property-watch-date {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: #eef7ff;
  color: var(--lfn-navy);
  font-size: 0.8rem;
  font-weight: 950;
  text-align: center;
}

.property-watch-item.warning {
  border-color: #f3c969;
  background: #fffaf0;
}

.property-watch-item.warning .property-watch-date {
  background: #fff2c8;
  color: #7a4a00;
}

.property-watch-item.urgent {
  border-color: #f0a0a0;
  background: #fff6f6;
}

.property-watch-item.urgent .property-watch-date {
  background: #ffe4e4;
  color: #a01818;
}

.property-watch-item strong,
.property-watch-item small,
.property-deposit-item strong,
.property-deposit-item small {
  display: block;
  min-width: 0;
}

.property-watch-item strong,
.property-deposit-item strong {
  overflow: hidden;
  color: var(--lfn-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-watch-item small,
.property-deposit-item small {
  margin-top: 4px;
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.property-deposit-item > span {
  text-align: right;
}

@media (max-width: 1180px) {
  .property-management-page .property-management-grid,
  .property-management-form .property-form-grid {
    grid-template-columns: 1fr;
  }

  .property-management-list-card {
    grid-row: auto;
  }
}

@media (max-width: 820px) {
  .property-management-card-actions {
    width: 100%;
    justify-content: stretch;
  }

  .property-management-card-actions .compact-action {
    width: 100%;
  }

  .property-management-tools {
    grid-template-columns: 1fr;
  }

  .property-management-export {
    justify-content: stretch;
  }

  .property-management-export .compact-action {
    width: 100%;
  }

  .property-management-totals {
    grid-template-columns: 1fr;
  }

  .property-management-table .modern-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }

  .property-management-form .form-actions .purple-button,
  .property-management-form .form-actions .outline-purple,
  .property-management-form .form-actions .danger-action {
    width: 100%;
  }

  .property-lease-pdf-summary,
  .property-lease-pdf-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .property-lease-pdf-actions .outline-purple,
  .property-lease-pdf-actions .danger-action {
    width: 100%;
  }

  .property-watch-item,
  .property-deposit-item {
    grid-template-columns: 1fr;
  }

  .property-deposit-item > span {
    text-align: left;
  }
}

/* Broker business expenses */
.business-expenses-page .lfn-dashboard .topbar-actions {
  gap: 10px;
  width: min(100%, 620px);
}

.business-expenses-page .lfn-dashboard .outline-purple.compact-action,
.business-expenses-page .lfn-dashboard .purple-button.compact-action {
  text-decoration: none;
  width: auto;
}

.business-expenses-page .lfn-dashboard .topbar-actions > .compact-action {
  flex: 0 0 auto;
}

.business-expenses-page .lfn-dashboard .tax-year-control {
  flex: 0 0 132px;
}

.business-expenses-page .business-expenses-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
  gap: 18px;
}

.business-expense-list-card {
  grid-column: 1 / -1;
}

.business-expense-summary-cards {
  margin-bottom: 18px;
}

.business-expense-summary-cards .summary-card {
  min-height: 128px;
  border: 1px solid rgba(219, 229, 239, 0.9);
  box-shadow: 0 16px 34px rgba(17, 39, 65, 0.07);
}

.business-expense-summary-cards .summary-card a {
  width: fit-content;
}

.business-insights-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 18px;
  padding: 0;
  overflow: hidden;
}

.business-insights-card article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  border-right: 1px solid #e6edf5;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.business-insights-card article:last-child {
  border-right: 0;
}

.business-insights-card span,
.business-insights-card small {
  overflow: hidden;
  color: var(--lfn-muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-insights-card span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.business-insights-card strong {
  overflow: hidden;
  color: var(--lfn-navy);
  font-size: clamp(1.08rem, 1.65vw, 1.46rem);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-1099-card {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.business-1099-page .business-1099-card {
  margin-bottom: 0;
}

.business-1099-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.business-1099-status {
  margin: 0;
}

.business-1099-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.business-1099-summary article {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.business-1099-summary span,
.business-1099-summary small {
  overflow: hidden;
  color: var(--lfn-muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-1099-summary span {
  text-transform: uppercase;
}

.business-1099-summary strong {
  overflow: hidden;
  color: var(--lfn-navy);
  font-size: 1.28rem;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-1099-list {
  display: grid;
  gap: 10px;
}

.business-1099-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr) minmax(120px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.business-1099-row.review {
  border-color: #f1d38a;
  background: #fffaf0;
}

.business-1099-row.likely {
  border-color: #cce4d5;
  background: #f7fcf9;
}

.business-1099-row.below {
  background: #fbfdff;
}

.business-1099-recipient,
.business-1099-amount {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.business-1099-recipient strong,
.business-1099-recipient small,
.business-1099-amount strong,
.business-1099-amount small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-1099-recipient strong,
.business-1099-amount strong {
  color: var(--lfn-text);
  font-weight: 950;
}

.business-1099-recipient small,
.business-1099-amount small {
  color: var(--lfn-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.business-1099-review {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.business-1099-review span {
  min-height: 26px;
  border: 1px solid #d8e2ed;
  border-radius: 8px;
  padding: 6px 8px;
  background: #f7fafc;
  color: #52657a;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.business-1099-amount {
  text-align: right;
}

.business-1099-records {
  display: grid;
  gap: 10px;
  border-top: 1px solid #e4ebf2;
  padding-top: 14px;
}

.business-1099-record-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.business-1099-record-header h3 {
  margin: 0 0 4px;
  color: var(--lfn-navy);
  font-size: 1rem;
}

.business-1099-record-header p {
  margin: 0;
  color: var(--lfn-muted);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.35;
}

.business-1099-record-list {
  display: grid;
  gap: 9px;
}

.business-1099-saved-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(142px, 0.32fr) minmax(118px, auto);
  gap: 12px;
  align-items: center;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.business-1099-saved-row label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.business-1099-saved-row label span {
  color: var(--lfn-muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.business-1099-saved-row select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d7e1ec;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--lfn-text);
  font-size: 0.84rem;
  font-weight: 850;
}

.business-expense-form-card,
.business-subscription-card,
.business-listing-spend-card,
.business-category-card {
  align-self: start;
}

.business-expense-list-card,
.business-expense-form-card,
.business-subscription-card,
.business-listing-spend-card,
.business-category-card {
  border: 1px solid rgba(219, 229, 239, 0.95);
  box-shadow: 0 18px 38px rgba(17, 39, 65, 0.065);
}

.business-expense-list-card > .card-header,
.business-expense-form-card > .card-header,
.business-subscription-card > .card-header,
.business-listing-spend-card > .card-header,
.business-category-card > .card-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.business-expense-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.business-expense-card-actions .compact-action {
  min-width: 104px;
}

.business-expense-form-card {
  position: sticky;
  top: 24px;
}

.business-expense-tools {
  grid-template-columns: minmax(260px, 1fr) minmax(132px, 0.22fr) minmax(180px, 0.3fr) minmax(220px, 0.38fr);
  gap: 12px;
  align-items: end;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 251, 255, 0.96)),
    #fbfdff;
}

.business-expense-tools input,
.business-expense-tools select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  padding: 0 13px;
  background: #ffffff;
  color: var(--lfn-text);
  font-size: 0.95rem;
  font-weight: 800;
  outline: 0;
}

.business-expense-tools input:focus,
.business-expense-tools select:focus {
  border-color: var(--lfn-gold);
  box-shadow: 0 0 0 3px rgba(198, 162, 71, 0.14);
}

.business-expense-table {
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.business-expense-table .modern-row {
  grid-template-columns:
    minmax(104px, 0.62fr)
    minmax(142px, 0.92fr)
    minmax(104px, 0.62fr)
    minmax(96px, 0.54fr)
    minmax(112px, 0.64fr)
    minmax(146px, 0.84fr)
    minmax(160px, 0.9fr);
  gap: 10px;
  padding: 0 14px;
}

.business-expense-table .modern-head {
  min-height: 44px;
  border-bottom: 1px solid #dfe8f1;
  background: #f8fafc;
}

.business-expense-row {
  min-height: 74px;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
  transition:
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.business-expense-row:last-child {
  border-bottom: 0;
}

.business-expense-row:hover {
  background: #fbfdff;
  box-shadow: inset 4px 0 0 var(--lfn-gold);
}

.business-expense-vendor,
.business-expense-amount {
  display: grid;
  gap: 4px;
}

.business-expense-row strong,
.business-expense-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-expense-row small,
.business-expense-notes {
  color: var(--lfn-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.business-expense-notes,
.business-expense-listing {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-expense-listing.has-listing {
  color: var(--lfn-navy);
  font-weight: 900;
}

.business-expense-listing.no-listing {
  color: #8a98aa;
}

.business-category-badge,
.business-type-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  border-radius: 8px;
  padding: 0 9px;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.business-category-badge {
  border: 1px solid #dbe5ef;
  background: #f7fafc;
  color: #52657a;
}

.business-type-badge.expense {
  background: #eaf7ef;
  color: #227647;
}

.business-type-badge.subscription {
  background: #eaf3ff;
  color: #1d5f94;
}

.business-type-badge .dot {
  margin-right: 7px;
}

.business-expense-form .business-expense-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.business-expense-form .subscription-only[hidden] {
  display: none;
}

.business-expense-form .form-actions {
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.business-expense-form textarea {
  min-height: 104px;
}

.business-category-hint {
  display: block;
  margin-top: 6px;
  color: var(--lfn-muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.25;
}

.business-expense-form .form-actions .outline-purple,
.business-expense-form .form-actions .danger-action {
  width: auto;
  margin-top: 0;
}

.business-subscription-list,
.business-listing-spend-list,
.business-category-list {
  display: grid;
  gap: 10px;
}

.business-subscription-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.business-subscription-item:hover {
  border-color: #c9d7e6;
  background: #f8fbff;
  transform: translateY(-1px);
}

.business-subscription-item.paused {
  border-color: #f3d58a;
  background: #fffaf0;
}

.business-subscription-item.canceled {
  border-color: #d8e0ea;
  background: #f7f9fb;
}

.business-subscription-item.ended {
  border-color: #d8e0ea;
  background:
    linear-gradient(90deg, rgba(138, 152, 170, 0.16), rgba(255, 255, 255, 0) 48%),
    #f7f9fb;
}

.business-subscription-item.soon {
  border-color: #f3d58a;
  background:
    linear-gradient(90deg, rgba(243, 213, 138, 0.22), rgba(255, 255, 255, 0) 48%),
    #fbfdff;
}

.business-subscription-renewal {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: #eef7ff;
  color: var(--lfn-navy);
  font-size: 0.8rem;
  font-weight: 950;
  text-align: center;
}

.business-subscription-item.paused .business-subscription-renewal {
  background: #fff2c8;
  color: #7a4a00;
}

.business-subscription-item.canceled .business-subscription-renewal {
  background: #eef2f6;
  color: #5f6c7c;
}

.business-subscription-item.ended .business-subscription-renewal {
  background: #eef2f6;
  color: #5f6c7c;
}

.business-subscription-item strong,
.business-subscription-item small,
.business-category-item strong,
.business-category-item small {
  display: block;
  min-width: 0;
}

.business-subscription-item strong,
.business-category-item strong {
  overflow: hidden;
  color: var(--lfn-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-subscription-item small,
.business-category-item small {
  margin-top: 4px;
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.business-subscription-item > span:last-child {
  text-align: right;
}

.business-listing-spend-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.business-listing-spend-item:hover {
  border-color: #c9d7e6;
  background: #f8fbff;
  transform: translateY(-1px);
}

.business-listing-spend-item strong,
.business-listing-spend-item small {
  display: block;
  min-width: 0;
}

.business-listing-spend-item strong {
  overflow: hidden;
  color: var(--lfn-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-listing-spend-item small {
  margin-top: 4px;
  color: var(--lfn-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.business-listing-spend-item > span {
  color: var(--lfn-navy);
  font-weight: 950;
  white-space: nowrap;
}

.business-category-item {
  display: grid;
  gap: 9px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.business-category-item > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.business-category-item > span {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.business-category-item i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d6b9f 0%, #d7b755 100%);
}

@media (max-width: 1180px) {
  .business-insights-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-1099-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-1099-row {
    grid-template-columns: minmax(0, 1fr) minmax(170px, 0.7fr) minmax(110px, auto);
  }

  .business-1099-saved-row {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 0.5fr) minmax(110px, auto);
  }

  .business-insights-card article:nth-child(2) {
    border-right: 0;
  }

  .business-insights-card article:nth-child(n + 3) {
    border-top: 1px solid #e6edf5;
  }

  .business-expenses-page .business-expenses-grid,
  .business-expense-form .business-expense-form-grid {
    grid-template-columns: 1fr;
  }

  .business-expense-form-card {
    position: static;
  }

  .business-expense-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .business-expense-tools label:first-child {
    grid-column: 1 / -1;
  }

  .business-expense-export {
    justify-content: flex-start;
  }

  .business-expenses-page .business-expense-table {
    gap: 10px;
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .business-expense-table .modern-head {
    display: none;
  }

  .business-expense-table .modern-row:not(.modern-head) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    min-height: 0;
    border: 1px solid #dfe8f1;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 39, 65, 0.055);
  }

  .business-expense-table .modern-row:not(.modern-head) > span {
    display: grid;
    grid-template-columns: minmax(76px, 0.34fr) minmax(0, 1fr);
    gap: 5px 12px;
    align-items: center;
    width: 100%;
    min-width: 0;
    overflow: visible;
    color: var(--backend-ink);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
    white-space: normal;
  }

  .business-expense-table .modern-row:not(.modern-head) > span::before {
    content: attr(data-label);
    grid-column: 1;
    color: var(--lfn-muted);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
  }

  .business-expense-table .modern-row:not(.modern-head) > span > * {
    grid-column: 2;
    justify-self: end;
    min-width: 0;
  }

  .business-expense-table .modern-row:not(.modern-head) > .business-expense-vendor::before,
  .business-expense-table .modern-row:not(.modern-head) > .business-expense-amount::before {
    align-self: start;
    grid-row: 1 / span 2;
    padding-top: 2px;
  }

  .business-expense-table .modern-row:not(.modern-head) > .business-expense-vendor strong,
  .business-expense-table .modern-row:not(.modern-head) > .business-expense-vendor small,
  .business-expense-table .modern-row:not(.modern-head) > .business-expense-amount strong,
  .business-expense-table .modern-row:not(.modern-head) > .business-expense-amount small {
    grid-column: 2;
    justify-self: end;
    max-width: 100%;
    text-align: right;
    white-space: normal;
  }

  .business-expense-table .modern-row:not(.modern-head) > .business-expense-listing,
  .business-expense-table .modern-row:not(.modern-head) > .business-expense-notes {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }
}

@media (max-width: 820px) {
  .business-insights-card {
    grid-template-columns: 1fr;
  }

  .business-1099-actions {
    justify-content: stretch;
  }

  .business-1099-actions .compact-action {
    width: 100%;
  }

  .business-1099-summary,
  .business-1099-row,
  .business-1099-saved-row {
    grid-template-columns: 1fr;
  }

  .business-1099-record-header {
    display: grid;
  }

  .business-1099-amount {
    text-align: left;
  }

  .business-insights-card article {
    border-right: 0;
    border-top: 1px solid #e6edf5;
  }

  .business-insights-card article:first-child {
    border-top: 0;
  }

  .business-expense-tools {
    grid-template-columns: 1fr;
  }

  .business-expense-list-card > .card-header,
  .business-expense-form-card > .card-header,
  .business-subscription-card > .card-header,
  .business-listing-spend-card > .card-header,
  .business-category-card > .card-header {
    display: grid;
  }

  .business-expense-card-actions {
    justify-content: stretch;
  }

  .business-expense-card-actions .compact-action {
    width: 100%;
  }

  .business-expense-form .form-actions .purple-button,
  .business-expense-form .form-actions .outline-purple,
  .business-expense-form .form-actions .danger-action {
    width: 100%;
  }

  .business-expenses-page .lfn-dashboard .topbar-actions {
    align-items: stretch;
  }

  .business-expenses-page .lfn-dashboard .topbar-actions > .compact-action,
  .business-expenses-page .lfn-dashboard .topbar-actions > .tax-year-control {
    width: 100%;
  }

  .business-subscription-item {
    grid-template-columns: 1fr;
  }

  .business-subscription-item > span:last-child {
    text-align: left;
  }
}

/* Agent workspace consistency pass */
body.agent-workspace-page .lfn-dashboard,
body.agent-context-view .lfn-dashboard {
  --agent-accent: #1d6b9a;
  --agent-accent-2: #2f8b57;
  --agent-accent-soft: #eaf6fb;
  --agent-panel: #fbfdff;
}

body.agent-workspace-page .lfn-sidebar,
body.agent-context-view .lfn-sidebar {
  background:
    radial-gradient(circle at top left, rgba(198, 162, 71, 0.16), transparent 18rem),
    radial-gradient(circle at 90% 12%, rgba(29, 107, 154, 0.18), transparent 16rem),
    linear-gradient(180deg, #10213a, #0b1727);
}

body.agent-workspace-page .lfn-nav a.active,
body.agent-workspace-page .lfn-nav a:hover,
body.agent-context-view .lfn-nav a.active,
body.agent-context-view .lfn-nav a:hover {
  background: linear-gradient(135deg, #dff1f8, #f0d372);
  color: #10213a;
}

body.agent-workspace-page .lfn-nav a.active span,
body.agent-workspace-page .lfn-nav a:hover span,
body.agent-context-view .lfn-nav a.active span,
body.agent-context-view .lfn-nav a:hover span {
  color: #10213a;
}

body.agent-workspace-page .lfn-dashboard .lfn-topbar,
body.agent-context-view .lfn-dashboard .lfn-topbar {
  border: 1px solid #dbe7ef;
  border-radius: 8px;
  padding: clamp(18px, 2.4vw, 24px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(234, 246, 251, 0.96) 54%, rgba(255, 248, 232, 0.95) 100%);
  box-shadow: 0 18px 44px rgba(17, 39, 65, 0.075);
}

body.agent-workspace-page .lfn-dashboard .lfn-topbar::after,
body.agent-context-view .lfn-dashboard .lfn-topbar::after {
  content: none;
}

body.agent-workspace-page .lfn-dashboard .lfn-topbar .eyebrow,
body.agent-context-view .lfn-dashboard .lfn-topbar .eyebrow {
  border-color: #cfe1ec;
  background: #ffffff;
  color: var(--agent-accent);
}

body.agent-workspace-page .lfn-dashboard .purple-button,
body.agent-context-view .lfn-dashboard .purple-button {
  background: #10213a;
  box-shadow: 0 12px 22px rgba(16, 33, 58, 0.18);
}

body.agent-workspace-page .lfn-dashboard .purple-button:hover,
body.agent-context-view .lfn-dashboard .purple-button:hover {
  background: #1d6b9a;
}

body.agent-workspace-page .lfn-dashboard .outline-purple,
body.agent-workspace-page .lfn-dashboard .top-link,
body.agent-context-view .lfn-dashboard .outline-purple,
body.agent-context-view .lfn-dashboard .top-link {
  border-color: #c8d9e6;
  background: rgba(255, 255, 255, 0.78);
  color: #10213a;
}

body.agent-workspace-page .lfn-dashboard .outline-purple:hover,
body.agent-workspace-page .lfn-dashboard .top-link:hover,
body.agent-context-view .lfn-dashboard .outline-purple:hover,
body.agent-context-view .lfn-dashboard .top-link:hover {
  border-color: rgba(29, 107, 154, 0.42);
  background: var(--agent-accent-soft);
  color: #10213a;
}

body.agent-workspace-page .lfn-dashboard .white-card,
body.agent-context-view .lfn-dashboard .white-card {
  border-color: #dbe7ef;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(251, 253, 255, 0.98)),
    #ffffff;
}

body.agent-workspace-page .lfn-dashboard .card-header,
body.agent-context-view .lfn-dashboard .card-header {
  align-items: center;
}

body.agent-workspace-page .lfn-dashboard .card-header h2,
body.agent-context-view .lfn-dashboard .card-header h2 {
  letter-spacing: 0;
}

body.agent-workspace-page .lfn-dashboard .muted-label,
body.agent-workspace-page .lfn-dashboard .status-badge,
body.agent-context-view .lfn-dashboard .muted-label,
body.agent-context-view .lfn-dashboard .status-badge {
  border-color: #cfe1ec;
  background: var(--agent-accent-soft);
  color: #1d5f86;
}

body.agent-workspace-page .lfn-dashboard .dashboard-metric-card,
body.agent-context-view .lfn-dashboard .dashboard-metric-card,
body.agent-context-view .lfn-dashboard .transaction-metric-card {
  border-color: #dbe7ef;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

body.agent-workspace-page .lfn-dashboard .dashboard-metric-card .summary-icon,
body.agent-context-view .lfn-dashboard .dashboard-metric-card .summary-icon,
body.agent-context-view .lfn-dashboard .transaction-metric-card .summary-icon {
  border-color: #cfe1ec;
  background: #eef8fb;
  color: var(--agent-accent);
}

body.agent-workspace-page .agent-dashboard-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.92fr);
}

body.agent-workspace-page .compact-upcoming-card,
body.agent-context-view .compact-upcoming-card {
  border-left: 4px solid var(--agent-accent);
}

body.agent-workspace-page .agent-doc-upload-card,
body.agent-workspace-page .transaction-entry-card,
body.agent-context-view .transaction-documents-card,
body.agent-context-view .client-portal-admin-section {
  position: relative;
}

body.agent-workspace-page .modern-upload,
body.agent-context-view .modern-upload {
  border-color: #cfe1ec;
  background:
    linear-gradient(180deg, rgba(234, 246, 251, 0.72), rgba(255, 255, 255, 0.96));
}

body.agent-workspace-page .modern-upload span,
body.agent-context-view .modern-upload span {
  background: var(--agent-accent);
}

body.agent-workspace-page .agent-client-access-panel,
body.agent-context-view .agent-client-access-panel,
body.agent-context-view .client-portal-status {
  border-color: #cfe1ec;
  background:
    linear-gradient(135deg, rgba(234, 246, 251, 0.94), rgba(255, 248, 232, 0.8));
}

body.agent-workspace-page .scan-status article,
body.agent-context-view .quick-links a,
body.agent-context-view .field-checklist label,
body.agent-context-view .automation-list button {
  border-color: #dbe7ef;
  background: var(--agent-panel);
}

body.agent-workspace-page .scan-status article.complete {
  border-color: #cfe1ec;
  background: #f3fbfd;
}

body.agent-context-view .transactions-card .transaction-click-row {
  border-color: #dbe7ef;
}

body.agent-context-view .transactions-card .transaction-click-row:hover {
  border-color: #c3d8e7;
  background: #f8fcff;
}

body.agent-context-view .financials-card .financial-table,
body.agent-context-view .modern-table,
body.agent-context-view .lead-table,
body.agent-context-view .listing-inventory {
  border-color: #dbe7ef;
}

body.agent-context-view .tax-year-control {
  border-color: #dbe7ef;
  background: rgba(255, 255, 255, 0.78);
}

body.agent-context-view .agent-profile-grid {
  max-width: 1180px;
}

body.agent-context-view.admin-agent-profile-page .agent-profile-card {
  border-top: 4px solid var(--agent-accent);
}

body.agent-context-view .marketing-hero-card,
body.agent-context-view .calendar-toolbar.white-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(234, 246, 251, 0.96) 58%, rgba(255, 248, 232, 0.92) 100%);
}

@media (max-width: 1320px) {
  body.agent-workspace-page .lfn-dashboard .lfn-topbar,
  body.agent-context-view .lfn-dashboard .lfn-topbar {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  body.agent-workspace-page .lfn-dashboard .topbar-actions,
  body.agent-context-view .lfn-dashboard .topbar-actions {
    justify-content: flex-start;
  }

  body.agent-workspace-page .agent-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body.agent-workspace-page .lfn-dashboard .lfn-topbar,
  body.agent-context-view .lfn-dashboard .lfn-topbar {
    padding: 16px;
  }

  body.agent-workspace-page .lfn-dashboard .topbar-actions,
  body.agent-context-view .lfn-dashboard .topbar-actions {
    gap: 10px;
  }

  body.agent-workspace-page .lfn-dashboard .card-header,
  body.agent-context-view .lfn-dashboard .card-header {
    align-items: flex-start;
  }
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid #dbe6ef;
  border-radius: 6px;
  margin: 0 0 24px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 252, 255, 0.98) 72%, rgba(255, 250, 235, 0.92) 100%);
  box-shadow:
    0 14px 34px rgba(15, 31, 53, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.transaction-detail-page .lfn-dashboard .transaction-heading-group {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-photo-control {
  position: relative;
  display: block;
  width: 72px;
  height: 58px;
  cursor: pointer;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-photo-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-thumb {
  position: relative;
  display: block;
  width: 72px;
  height: 58px;
  border: 1px solid #d5dde8;
  border-radius: 5px;
  background:
    linear-gradient(135deg, rgba(233, 240, 247, 0.95), rgba(248, 251, 253, 0.98)),
    #eef3f8;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.55) 49% 51%, transparent 52%),
    linear-gradient(45deg, transparent 0 48%, rgba(255, 255, 255, 0.35) 49% 51%, transparent 52%);
  opacity: 0.55;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-thumb::after {
  content: "Home";
  position: absolute;
  left: 8px;
  bottom: 6px;
  color: var(--lfn-navy);
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-thumb.has-image::before,
body.transaction-detail-page .lfn-dashboard .transaction-property-thumb.has-image::after {
  content: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-photo-action {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  display: inline-flex;
  justify-content: center;
  min-height: 18px;
  border-radius: 4px;
  padding: 3px 4px 2px;
  background: rgba(7, 48, 79, 0.88);
  color: #ffffff;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  transition:
    background 150ms ease,
    opacity 150ms ease;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-photo-control:hover .transaction-property-photo-action,
body.transaction-detail-page .lfn-dashboard .transaction-property-photo-control:focus-within .transaction-property-photo-action {
  background: #0b5f8b;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-photo-control.is-uploading {
  cursor: wait;
}

body.transaction-detail-page .lfn-dashboard .transaction-property-photo-control.is-uploading .transaction-property-photo-action {
  opacity: 0.78;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-topbar .transaction-topbar-title {
  min-width: 0;
  max-width: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-topbar h1 {
  overflow: visible;
  color: var(--lfn-navy);
  font-size: clamp(1.8rem, 2.35vw, 2.42rem);
  font-weight: 850;
  line-height: 1.08;
  text-overflow: clip;
  white-space: normal;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-topbar p {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  color: var(--lfn-navy);
  font-size: 0.7rem;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-meta-item,
body.transaction-detail-page .lfn-dashboard .transaction-header-details-link {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid #d7e2ed;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--lfn-navy);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  text-decoration: none;
  white-space: nowrap;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-side {
  border-color: #cfe2ed;
  background: #eff8fb;
  color: #174f72;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-details-link {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: #0b3f63;
  font-weight: 950;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-details-link:hover,
body.transaction-detail-page .lfn-dashboard .transaction-header-details-link:focus {
  border-color: #cfe2ed;
  background: #ffffff;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 128px;
  color: #0b3f63;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label::before,
body.transaction-detail-page .lfn-dashboard .transaction-header-status-label::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label::before {
  left: 9px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(11, 63, 99, 0.08);
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label::after {
  right: 10px;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  margin-top: -4px;
  opacity: 0.82;
  transform: rotate(45deg);
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-select {
  width: 100%;
  min-height: 28px;
  border: 1px solid #cfe0ec;
  border-radius: 999px;
  padding: 0 28px 0 25px;
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px rgba(16, 39, 63, 0.04);
  color: currentColor;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  letter-spacing: inherit;
  line-height: inherit;
  text-transform: uppercase;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-select option {
  background: #ffffff;
  color: #10213a;
  font-size: 0.9rem;
  font-weight: 750;
  text-transform: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-select:focus {
  outline: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-select:focus-visible {
  border-color: #4e91d6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 3px rgba(47, 140, 255, 0.14);
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-pre_offer {
  color: #245ba7;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-pre_offer .transaction-header-status-select {
  border-color: #cfe0fb;
  background: #f4f8ff;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-under_contract {
  color: #1d66a7;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-under_contract .transaction-header-status-select {
  border-color: #c8e0f8;
  background: #eff7ff;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-sold {
  color: #6543b9;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-sold .transaction-header-status-select {
  border-color: #d9d0ff;
  background: #f5f2ff;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-withdrawn,
body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-terminated {
  color: #a9442a;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-withdrawn .transaction-header-status-select,
body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-terminated .transaction-header-status-select {
  border-color: #cbd7e3;
  background: #f6fafc;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-archived {
  color: #5d6878;
}

body.transaction-detail-page .lfn-dashboard .transaction-header-status-label.is-archived .transaction-header-status-select {
  border-color: #d8dee7;
  background: #f6f8fb;
}

body.transaction-detail-page .lfn-dashboard .transaction-topbar-actions {
  display: flex;
  gap: 0;
  justify-content: flex-end;
  min-width: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-action-buttons {
  gap: 8px;
  border-right: 0;
  padding-right: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-action-buttons .purple-button,
body.transaction-detail-page .lfn-dashboard .transaction-action-buttons .top-link {
  min-height: 36px;
  border-radius: 6px;
  padding: 0 14px;
  box-shadow: none;
  font-size: 0.8rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-action-buttons .purple-button {
  min-width: 118px;
  background: #0b3f63;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d6dee8;
  border-radius: 4px;
  background: #ffffff;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-tabs {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  border-bottom: 1px solid #0b3f63;
  background: #0b3f63;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-tabs button {
  position: relative;
  min-width: 126px;
  min-height: 48px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0 20px;
  background: #0b3f63;
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 760;
  letter-spacing: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-tabs button:hover,
body.transaction-detail-page .lfn-dashboard .transaction-workspace-tabs button:focus {
  background: #124f79;
  color: #ffffff;
  outline: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-tabs button.active {
  background: #07304f;
  color: #ffffff;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-tabs button.active::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: #58b7ff;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-message {
  margin: 0;
  padding: 0 18px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-message:not(:empty) {
  padding-top: 12px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-panel {
  padding: 12px 18px 16px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-panel[hidden] {
  display: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card {
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .card-header {
  align-items: start;
  min-height: 34px;
  border-bottom: 0;
  padding-bottom: 8px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .card-header h2 {
  color: #10213a;
  font-size: 1.04rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .card-kicker {
  margin-top: 2px;
  color: #6a7584;
  font-size: 0.78rem;
  font-weight: 700;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .transaction-hero-document-readiness:empty {
  display: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .transaction-hero-document-readiness {
  gap: 8px;
  margin-bottom: 8px;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-summary {
  gap: 6px 12px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.07em;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-summary strong {
  margin-top: 1px;
  font-size: 1.08rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-summary em {
  min-height: 26px;
  padding: 0 10px;
  font-size: 0.7rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-meter {
  height: 7px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups {
  gap: 8px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups section {
  gap: 7px;
  border-radius: 8px;
  padding: 9px 12px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups h3 {
  font-size: 0.66rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups h3 small {
  min-height: 20px;
  padding: 0 7px;
  font-size: 0.66rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups section > div {
  gap: 6px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups section:only-child > div {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups section > div > span,
body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups section > div > button {
  grid-template-columns: 18px minmax(0, 1fr) auto;
  min-height: 30px;
  border-radius: 7px;
  padding: 0 9px;
  font-size: 0.75rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups i {
  width: 18px;
  height: 18px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-checklist-groups button small {
  font-size: 0.61rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-export-panel,
body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .cda-signature-panel {
  min-height: 58px;
  border-color: #d8e4ef;
  border-radius: 7px;
  margin: 12px 0 0;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-export-panel strong,
body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .cda-signature-panel strong {
  color: #0b3f63;
  font-size: 0.88rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-export-panel span,
body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .cda-signature-panel span {
  font-size: 0.75rem;
  line-height: 1.25;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-export-actions {
  display: grid;
  grid-template-columns: 126px 126px;
  gap: 6px;
}

body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-export-actions .compact-action,
body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .cda-signature-panel .compact-action {
  min-height: 34px;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 0.76rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-card {
  display: grid;
  gap: 12px;
  border-color: #d6dee8;
  border-radius: 4px;
  padding: 14px 16px 16px;
  box-shadow: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-summary {
  display: grid;
  gap: 3px;
  border: 1px solid #d9e5f0;
  border-radius: 7px;
  padding: 12px 14px;
  background: #f8fbff;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-summary strong {
  color: #10213a;
  font-size: 0.92rem;
  font-weight: 900;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-summary span {
  color: #5f6f82;
  font-size: 0.78rem;
  font-weight: 740;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-list {
  display: grid;
  gap: 0;
  border: 1px solid #e0e7ef;
  border-radius: 7px;
  overflow: hidden;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 152px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid #e7edf4;
  padding: 9px 12px;
  background: #ffffff;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-row:last-child {
  border-bottom: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #7a8a9d;
  box-shadow: 0 0 0 4px rgba(122, 138, 157, 0.13);
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-dot.is-signed,
body.transaction-detail-page .lfn-dashboard .transaction-activity-dot.is-completed {
  background: #1f7a4f;
  box-shadow: 0 0 0 4px rgba(31, 122, 79, 0.14);
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-dot.is-sent,
body.transaction-detail-page .lfn-dashboard .transaction-activity-dot.is-shared,
body.transaction-detail-page .lfn-dashboard .transaction-activity-dot.is-viewed {
  background: #0077ff;
  box-shadow: 0 0 0 4px rgba(0, 119, 255, 0.14);
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-dot.is-declined,
body.transaction-detail-page .lfn-dashboard .transaction-activity-dot.is-voided,
body.transaction-detail-page .lfn-dashboard .transaction-activity-dot.is-expired {
  background: #b43636;
  box-shadow: 0 0 0 4px rgba(180, 54, 54, 0.13);
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-row strong {
  overflow: hidden;
  color: #10213a;
  font-size: 0.84rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-row span:not(.transaction-activity-dot) {
  overflow: hidden;
  color: #617184;
  font-size: 0.74rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.transaction-detail-page .lfn-dashboard .transaction-activity-row time {
  color: #5f6f82;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.lfn-dashboard .lfn-topbar .user-menu {
  display: none;
}

.lfn-dashboard .lfn-sidebar .sidebar-user-menu {
  display: grid;
  flex: 0 0 auto;
  grid-template-areas:
    "avatar identity"
    "action action";
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 7px 10px;
  align-items: center;
  box-sizing: border-box;
  min-height: 0;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  margin: -10px 0 2px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.lfn-dashboard .lfn-sidebar .sidebar-user-menu > div {
  grid-area: identity;
  min-width: 0;
}

.lfn-dashboard .lfn-sidebar .sidebar-user-menu strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lfn-dashboard .lfn-sidebar .sidebar-user-menu small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72rem;
}

.lfn-dashboard .lfn-sidebar .sidebar-user-menu a {
  grid-area: action;
  width: 100%;
  min-height: 28px;
  margin-left: 0;
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 0.74rem;
  text-align: center;
  white-space: nowrap;
}

.lfn-dashboard .lfn-sidebar .sidebar-user-menu .user-photo {
  grid-area: avatar;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.62);
}

body.transaction-detail-page .lfn-dashboard .transaction-edit-card {
  border-color: #d6dee8;
}

body.transaction-detail-page .lfn-dashboard .deal-detail-grid {
  gap: 10px;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-deadline-card {
  display: grid;
  gap: 10px;
  border-color: #d6dee8;
  border-radius: 4px;
  padding: 12px 14px 14px;
  box-shadow: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-deadline-card .transaction-detail-section-header {
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-deadline-card .transaction-detail-section-header strong {
  color: #10213a;
  font-size: 0.92rem;
  font-weight: 850;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-deadline-card .transaction-detail-section-header a {
  color: #2f8cff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card {
  display: grid;
  gap: 12px;
  overflow: hidden;
  border-color: #cfdbe8;
  border-radius: 6px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.9) 0%, rgba(255, 255, 255, 1) 42%),
    #ffffff;
  box-shadow: 0 14px 30px rgba(16, 33, 58, 0.06);
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #dce6f0;
  padding: 14px 16px;
  background: #fbfdff;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-card-header > div:not(.client-portal-header-actions) {
  display: grid;
  flex: 1 1 auto;
  gap: 4px;
  min-width: 0;
  max-width: 760px;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-kicker {
  color: #657386;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-card-header strong {
  color: #10213a;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.1;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-card-header p {
  max-width: 680px;
  margin: 0;
  color: #5a687a;
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-open-link {
  flex: 0 0 auto;
  min-height: 32px;
  width: auto;
  margin-top: 0;
  border-color: #c9d8e8;
  background: #ffffff;
  color: #0b3f63;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: none;
  text-decoration: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-header-actions .compact-action {
  min-height: 32px;
  width: auto;
  border-color: #c9d8e8;
  border-radius: 6px;
  padding: 0 14px;
  background: #ffffff;
  color: #0b3f63;
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

body.transaction-detail-page .lfn-dashboard .transaction-people-list {
  display: grid;
  gap: 0;
  margin: 0 16px;
  overflow: hidden;
  border: 1px solid #d8e3ee;
  border-radius: 6px;
  padding: 0;
  background: #ffffff;
}

body.transaction-detail-page .lfn-dashboard .transaction-people-table-head {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(210px, 1fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr);
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #e4ebf2;
  padding: 9px 12px;
  background: #f8fbff;
  color: #677383;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.transaction-detail-page .lfn-dashboard .transaction-people-table {
  display: grid;
  gap: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-row {
  display: grid;
  grid-template-columns: 34px minmax(214px, 1.2fr) minmax(210px, 1fr) minmax(130px, 0.55fr) minmax(130px, 0.55fr);
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid #e8eef5;
  padding: 8px 12px;
  color: #273241;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-row:last-child {
  border-bottom: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e9f1f8;
  color: #0b3f63;
  font-size: 0.68rem;
  font-weight: 900;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-name {
  display: grid;
  gap: 1px;
  min-width: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-name strong,
body.transaction-detail-page .lfn-dashboard .transaction-person-email,
body.transaction-detail-page .lfn-dashboard .transaction-person-status,
body.transaction-detail-page .lfn-dashboard .transaction-person-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-name strong {
  color: #172233;
  font-size: 0.82rem;
  font-weight: 850;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-name small,
body.transaction-detail-page .lfn-dashboard .transaction-person-email,
body.transaction-detail-page .lfn-dashboard .transaction-person-status {
  color: #687789;
  font-size: 0.74rem;
  font-weight: 700;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-status {
  text-align: left;
}

body.transaction-detail-page .lfn-dashboard .transaction-person-role {
  color: #2f8cff;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

body.transaction-detail-page .lfn-dashboard .client-portal-setup-card {
  display: grid;
  gap: 12px;
  margin: 4px 16px 16px;
  border: 1px solid #d8e3ee;
  border-radius: 6px;
  padding: 12px;
  background: #ffffff;
}

body.transaction-detail-page .lfn-dashboard .client-portal-setup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body.transaction-detail-page .lfn-dashboard .client-portal-setup-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.transaction-detail-page .lfn-dashboard .client-portal-setup-header strong {
  color: #10213a;
  font-size: 0.94rem;
  font-weight: 900;
}

body.transaction-detail-page .lfn-dashboard .client-portal-setup-header p {
  margin: 0;
  color: #5f6f82;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.35;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-status {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  border-color: #d8e3ee;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fbff;
  color: #415166;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-status.success {
  border-color: #bfe3cf;
  background: #f0faf4;
  color: #1f7a4f;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-status.error {
  border-color: #f0b6b6;
  background: #fff5f5;
  color: #b43636;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-status::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: #7a8a9d;
  box-shadow: 0 0 0 4px rgba(122, 138, 157, 0.14);
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-status.success::before {
  background: #1f7a4f;
  box-shadow: 0 0 0 4px rgba(31, 122, 79, 0.14);
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-status.error::before {
  background: #b43636;
  box-shadow: 0 0 0 4px rgba(180, 54, 54, 0.14);
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card label {
  position: relative;
  display: grid;
  gap: 0;
  min-height: 50px;
  border: 1px solid #ccd9e7;
  border-radius: 6px;
  padding: 8px 10px 6px;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.73rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card label:focus-within {
  border-color: #0077ff;
  box-shadow: 0 0 0 1px #0077ff;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card label span {
  margin-bottom: 5px;
  color: #677383;
  font-size: 0.66rem;
  font-weight: 750;
  line-height: 1.1;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card input,
body.transaction-detail-page .lfn-dashboard .transaction-client-access-card select {
  min-height: 24px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: #252b33;
  font-size: 0.82rem;
  font-weight: 500;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card input:focus,
body.transaction-detail-page .lfn-dashboard .transaction-client-access-card select:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: center;
  margin: 0;
  border: 1px solid #dce7f2;
  border-radius: 6px;
  padding: 12px;
  background: linear-gradient(135deg, #fbfdff 0%, #f7fbf8 100%);
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness strong {
  color: #10213a;
  font-size: 0.82rem;
  font-weight: 900;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness span {
  color: #607084;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.35;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness li {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  min-width: 0;
  border: 1px solid #dce7f2;
  border-radius: 5px;
  padding: 0 10px;
  background: #ffffff;
  color: #32445a;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.15;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness li::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2f8cff;
  box-shadow: 0 0 0 3px rgba(47, 140, 255, 0.12);
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-actions {
  justify-content: space-between;
  padding: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-actions .compact-action {
  flex: 0 0 auto;
  min-height: 36px;
  width: auto;
  margin-top: 0;
  border-radius: 6px;
  padding: 0 14px;
  box-shadow: none;
  font-size: 0.8rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-actions .outline-purple {
  border-color: #c9d8e8;
  background: #ffffff;
  color: #0b3f63;
}

body.transaction-detail-page .lfn-dashboard .transaction-edit-card > .card-header {
  min-height: 44px;
  height: 44px;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 0;
  padding: 0 16px;
  background: #fbfdff;
}

body.transaction-detail-page .lfn-dashboard .transaction-edit-card > .card-header h2 {
  color: #10213a;
  font-size: 0.92rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-edit-card > .card-header .muted-label {
  padding: 4px 9px;
  font-size: 0.66rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-form {
  padding: 10px 14px 16px;
}

body.transaction-detail-page .lfn-dashboard .transaction-form-section {
  gap: 10px;
  padding: 17px 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-form-section:first-child {
  padding-top: 0;
}

body.transaction-detail-page .lfn-dashboard .transaction-form-section h3 {
  font-size: 0.92rem;
  font-weight: 850;
}

body.transaction-detail-page .lfn-dashboard .transaction-form-grid {
  gap: 10px 14px;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-form label {
  min-height: 50px;
  border-color: #cfd8e3;
  border-radius: 3px;
  padding: 8px 10px 6px;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-form label span {
  margin-bottom: 5px;
  color: #677383;
  font-size: 0.66rem;
  font-weight: 750;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-form input,
body.transaction-detail-page .lfn-dashboard .transaction-detail-form select,
body.transaction-detail-page .lfn-dashboard .transaction-detail-form textarea {
  color: #252b33;
  font-size: 0.82rem;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-form textarea {
  min-height: 70px;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-form > .form-actions {
  justify-content: flex-end;
  padding-top: 14px;
}

body.transaction-detail-page .lfn-dashboard .transaction-detail-form > .form-actions .purple-button {
  min-width: 126px;
  min-height: 36px;
  box-shadow: none;
  font-size: 0.82rem;
}

@media (max-width: 1040px) {
  body.transaction-detail-page .lfn-dashboard .transaction-detail-topbar,
  body.transaction-detail-page .lfn-dashboard .transaction-topbar-actions {
    grid-template-columns: 1fr;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-topbar-actions {
    justify-content: stretch;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-action-buttons {
    justify-content: flex-start;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness {
    grid-template-columns: 1fr;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-workspace-panel {
    padding: 14px;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-workspace-tabs button {
    min-width: 112px;
    padding: 0 16px;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-activity-row {
    grid-template-columns: 18px minmax(0, 1fr) 132px;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-people-table-head {
    grid-template-columns: minmax(210px, 1.1fr) minmax(170px, 1fr) minmax(112px, 0.55fr) minmax(112px, 0.55fr);
  }

  body.transaction-detail-page .lfn-dashboard .transaction-person-row {
    grid-template-columns: 34px minmax(164px, 1.1fr) minmax(170px, 1fr) minmax(112px, 0.55fr) minmax(112px, 0.55fr);
  }
}

@media (max-width: 620px) {
  body.transaction-detail-page .lfn-dashboard .transaction-detail-topbar {
    align-items: stretch;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-topbar-actions,
  body.transaction-detail-page .lfn-dashboard .transaction-action-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-action-buttons {
    border-right: 0;
    padding-right: 0;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-card-header,
  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-header-actions,
  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-people-list {
    margin: 0 12px;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-people-table-head {
    display: none;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-person-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 3px 9px;
    min-height: 0;
    padding: 9px 0;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-person-email,
  body.transaction-detail-page .lfn-dashboard .transaction-person-status,
  body.transaction-detail-page .lfn-dashboard .transaction-person-role {
    grid-column: 2;
    text-align: left;
  }

  body.transaction-detail-page .lfn-dashboard .client-portal-setup-card {
    margin: 4px 12px 12px;
    padding: 10px;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-open-link,
  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-header-actions .compact-action,
  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-actions .compact-action {
    width: 100%;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-fields,
  body.transaction-detail-page .lfn-dashboard .transaction-client-access-card .client-portal-readiness ul {
    grid-template-columns: 1fr;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-workspace-tabs button {
    min-width: 104px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.8rem;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-workspace-panel {
    padding: 12px;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-activity-row {
    grid-template-columns: 16px minmax(0, 1fr);
  }

  body.transaction-detail-page .lfn-dashboard .transaction-activity-row time {
    grid-column: 2;
    text-align: left;
  }

  body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-export-actions {
    grid-template-columns: 1fr;
  }

  body.transaction-detail-page .lfn-dashboard .document-selection-bar {
    grid-template-columns: 1fr;
  }

  body.transaction-detail-page .lfn-dashboard .document-selection-actions {
    justify-content: flex-start;
  }
}

@media (min-width: 621px) {
  body.transaction-detail-page .lfn-dashboard .transaction-workspace-documents-card .document-selection-bar {
    grid-template-columns: minmax(180px, 1fr) auto auto;
  }
}

/* Transaction list polish */
body.transactions-page .lfn-dashboard .lfn-topbar {
  margin-bottom: 12px;
  border-radius: 4px;
  padding: 18px 20px;
  background: #ffffff;
  box-shadow: none;
}

body.transactions-page .lfn-dashboard .lfn-topbar h1 {
  font-size: clamp(1.85rem, 2.5vw, 2.35rem);
}

body.transactions-page .lfn-dashboard .lfn-topbar p {
  max-width: 820px;
  font-size: 0.92rem;
  line-height: 1.35;
}

body.transactions-page .transaction-summary-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

body.transactions-page .transaction-metric-card {
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  gap: 10px;
  min-height: 76px;
  border-radius: 4px;
  padding: 10px 34px 10px 10px;
  background: #ffffff;
  box-shadow: none;
}

body.transactions-page .transaction-metric-card .summary-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
}

body.transactions-page .transaction-metric-card .summary-icon svg,
body.transactions-page .transaction-metric-card .summary-icon .transaction-mark {
  width: 19px;
  height: 19px;
}

body.transactions-page .transaction-metric-card > div {
  gap: 3px;
}

body.transactions-page .transaction-metric-card strong {
  font-size: clamp(1.18rem, 1.5vw, 1.55rem);
}

body.transactions-page .transaction-metric-card span:not(.summary-icon) {
  font-size: 0.66rem;
  line-height: 1.15;
}

body.transactions-page .transaction-metric-card a {
  font-size: 0.72rem;
}

body.transactions-page .transaction-metric-card a::after {
  right: 8px;
  width: 22px;
  height: 22px;
  font-size: 0.9rem;
}

body.transactions-page .transactions-card {
  border-radius: 4px;
  padding: 14px;
  box-shadow: none;
}

body.transactions-page .transactions-card + .transactions-card {
  margin-top: 10px;
}

body.transactions-page .transactions-card > .card-header {
  align-items: center;
  margin-bottom: 10px;
}

body.transactions-page .transactions-card > .card-header > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body.transactions-page .transactions-card > .card-header h2 {
  font-size: 0.98rem;
}

body.transactions-page .transactions-card > .card-header p {
  margin: 0;
  color: var(--lfn-muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.3;
}

body.transactions-page .transaction-archive-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

body.transactions-page .transaction-card-actions .compact-action,
body.transactions-page .transaction-archive-actions .compact-action {
  min-height: 34px;
  border-radius: 5px;
  padding: 0 12px;
  font-size: 0.78rem;
}

body.transactions-page .transaction-archive-panel {
  margin-top: 10px;
}

body.transactions-page .transaction-archive-panel[hidden] {
  display: none;
}

body.transactions-page .transaction-archive-toggle[aria-expanded="true"] {
  border-color: #c9d4e2;
  background: #f3f6fa;
}

body.transactions-page .transaction-search-panel {
  align-items: end;
  margin-bottom: 8px;
  border-radius: 4px;
  padding: 8px;
  background: #fbfdff;
}

body.transactions-page .transaction-search-panel label {
  gap: 4px;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

body.transactions-page .transaction-search-panel input {
  min-height: 34px;
  border-radius: 4px;
  padding: 0 10px;
  font-size: 0.84rem;
}

body.transactions-page .transaction-search-tools {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  justify-items: end;
}

body.transactions-page .transaction-search-tools small {
  grid-column: 1 / -1;
  max-width: 280px;
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: right;
}

body.transactions-page .transaction-search-tools .compact-action {
  width: auto;
  min-width: 122px;
}

body.transactions-page .transaction-view-controls {
  display: inline-flex;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid #cfdbe8;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

body.transactions-page .transaction-view-controls[hidden] {
  display: none;
}

body.transactions-page .transaction-view-controls button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 0;
  border-right: 1px solid #dbe4ee;
  padding: 0 11px;
  background: transparent;
  color: #56657a;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 850;
}

body.transactions-page .transaction-view-controls button:last-child {
  border-right: 0;
}

body.transactions-page .transaction-view-controls button.active,
body.transactions-page .transaction-view-controls button[aria-pressed="true"] {
  background: #eaf6fb;
  color: #113b5a;
}

body.transactions-page .transaction-view-controls button:hover,
body.transactions-page .transaction-view-controls button:focus {
  background: #f3f9fc;
  color: #113b5a;
  outline: 0;
}

body.transactions-page .transaction-view-icon {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  width: 14px;
  height: 14px;
}

body.transactions-page .transaction-view-icon i {
  display: block;
  min-width: 0;
  min-height: 0;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.82;
}

body.transactions-page .transaction-view-icon.rows {
  grid-template-rows: repeat(3, 1fr);
}

body.transactions-page .transaction-view-icon.cards {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
}

body.transactions-page .transactions-card .modern-table {
  gap: 0;
  border-radius: 4px;
}

body.transactions-page .transactions-card .modern-head {
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid #d9e3ee;
  padding: 0 12px;
  background: #ffffff;
}

body.transactions-page .transactions-card .transaction-click-row {
  min-height: 62px;
  border: 0;
  border-bottom: 1px solid #e3e8ee;
  border-radius: 0;
  padding: 8px 12px;
  background: #ffffff;
  box-shadow: none;
}

body.transactions-page .transactions-card .transaction-click-row:last-child {
  border-bottom: 0;
}

body.transactions-page .transactions-card .transaction-click-row:hover {
  background: #fbfdff;
  box-shadow: inset 3px 0 0 #2f8cff;
}

body.transactions-page .transactions-card .transaction-card-grid-view {
  grid-template-columns: repeat(auto-fit, minmax(min(284px, 100%), 1fr));
  gap: 14px;
  overflow: visible;
  border: 0;
  background: transparent;
}

body.transactions-page .transaction-card-grid-view .modern-head {
  display: none;
}

body.transactions-page .transaction-card-grid-view .table-empty {
  grid-column: 1 / -1;
}

body.transactions-page .transaction-loop-card {
  display: grid;
  grid-template-rows: 124px minmax(0, 1fr);
  overflow: hidden;
  min-height: 348px;
  border: 1px solid #d6e0ea;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(18, 43, 67, 0.055);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

body.transactions-page .transaction-loop-card:hover,
body.transactions-page .transaction-loop-card:focus-visible {
  border-color: #b9cfdf;
  box-shadow: 0 16px 32px rgba(18, 43, 67, 0.08);
  outline: 0;
  transform: translateY(-1px);
}

body.transactions-page .transaction-loop-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid #d9e2eb;
  background:
    linear-gradient(180deg, #f8fbfd 0%, #ffffff 100%);
}

body.transactions-page .transaction-loop-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.transactions-page .transaction-loop-illustration {
  width: min(84%, 270px);
  height: auto;
  fill: none;
  stroke: #15273a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

body.transactions-page .transaction-loop-illustration path:nth-child(2),
body.transactions-page .transaction-loop-illustration path:nth-child(7),
body.transactions-page .transaction-loop-illustration path:nth-child(10),
body.transactions-page .transaction-loop-illustration path:nth-child(12) {
  stroke: #35aede;
}

body.transactions-page .transaction-loop-alert {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #ffd0db;
  border-radius: 999px;
  background: #ffffff;
  color: #d61f48;
  font-size: 0.82rem;
  font-weight: 950;
}

body.transactions-page .transaction-loop-alert svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

body.transactions-page .transaction-loop-body {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
  padding: 12px 13px 13px;
}

body.transactions-page .transaction-loop-body h3 {
  min-width: 0;
  color: var(--lfn-navy);
  font-size: 0.94rem;
  font-weight: 950;
  line-height: 1.2;
}

body.transactions-page .transaction-loop-body h3 a {
  color: inherit;
  text-decoration: none;
}

body.transactions-page .transaction-loop-body h3 a:hover,
body.transactions-page .transaction-loop-body h3 a:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.transactions-page .transaction-loop-location {
  min-height: 16px;
  margin: 0;
  overflow: hidden;
  color: #637286;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.transactions-page .transaction-loop-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

body.transactions-page .transaction-loop-fields p {
  display: flex;
  gap: 7px;
  align-items: baseline;
  min-width: 0;
  margin: 0;
  color: #5f6d7f;
  font-size: 0.76rem;
  line-height: 1.2;
}

body.transactions-page .transaction-loop-status-row {
  align-items: center;
}

body.transactions-page .transaction-loop-fields span {
  flex: 0 0 auto;
  color: #657286;
  font-weight: 750;
}

body.transactions-page .transaction-loop-fields strong {
  min-width: 0;
  overflow: hidden;
  color: #1f2b3a;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.transactions-page .transaction-loop-fields .transaction-status-pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 0.68rem;
}

body.transactions-page .transaction-loop-fields .needs-value {
  color: #0077cf;
}

body.transactions-page .transaction-loop-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 10px;
  align-items: end;
  margin-top: 4px;
}

body.transactions-page .transaction-loop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  align-items: center;
  min-width: 0;
}

body.transactions-page .transaction-loop-actions a {
  color: #5d6878;
  font-size: 0.74rem;
  font-weight: 850;
  text-decoration: none;
}

body.transactions-page .transaction-loop-actions a:hover,
body.transactions-page .transaction-loop-actions a:focus {
  color: #0e4f82;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.transactions-page .transaction-loop-closing {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #ffffff 0 53%, transparent 54%),
    conic-gradient(#047fdc 0 78%, #d7dde4 78% 100%);
  color: #1d2a3b;
  text-align: center;
}

body.transactions-page .transaction-loop-closing.warning {
  background:
    radial-gradient(circle at center, #ffffff 0 53%, transparent 54%),
    conic-gradient(#d69218 0 78%, #d7dde4 78% 100%);
}

body.transactions-page .transaction-loop-closing.urgent,
body.transactions-page .transaction-loop-closing.withdrawn,
body.transactions-page .transaction-loop-closing.terminated,
body.transactions-page .transaction-loop-closing.canceled {
  background:
    radial-gradient(circle at center, #ffffff 0 53%, transparent 54%),
    conic-gradient(#c84b39 0 78%, #d7dde4 78% 100%);
}

body.transactions-page .transaction-loop-closing.sold {
  background:
    radial-gradient(circle at center, #ffffff 0 53%, transparent 54%),
    conic-gradient(#7058d3 0 78%, #d7dde4 78% 100%);
}

body.transactions-page .transaction-loop-closing em,
body.transactions-page .transaction-loop-closing strong {
  display: block;
  font-style: normal;
  line-height: 1.05;
}

body.transactions-page .transaction-loop-closing em {
  font-size: 0.58rem;
  font-weight: 900;
}

body.transactions-page .transaction-loop-closing strong {
  margin-top: 2px;
  font-size: 0.6rem;
  font-weight: 950;
}

body.transactions-page .property-cell {
  gap: 10px;
}

body.transactions-page .property-thumb {
  width: 46px;
  height: 38px;
  border-radius: 4px;
}

body.transactions-page .property-cell strong {
  color: var(--lfn-navy);
  font-size: 0.86rem;
  line-height: 1.15;
}

body.transactions-page .property-cell small {
  margin-top: 3px;
  font-size: 0.72rem;
}

body.transactions-page .transaction-row-agent,
body.transactions-page .transaction-row-status,
body.transactions-page .transaction-row-date,
body.transactions-page .transaction-row-money {
  gap: 3px;
}

body.transactions-page .transaction-row-agent strong,
body.transactions-page .transaction-row-date strong,
body.transactions-page .transaction-row-money strong {
  font-size: 0.82rem;
}

body.transactions-page .transaction-row-agent small,
body.transactions-page .transaction-row-status small,
body.transactions-page .transaction-row-date small,
body.transactions-page .transaction-row-money small {
  font-size: 0.69rem;
}

body.transactions-page .transaction-loading-row {
  pointer-events: none;
}

body.transactions-page .transaction-loading-row span {
  display: grid;
  gap: 6px;
}

body.transactions-page .transaction-loading-row i,
body.transactions-page .transaction-loading-row b,
body.transactions-page .transaction-loading-row small {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf3f8 0%, #f8fbfd 42%, #edf3f8 82%);
  background-size: 220% 100%;
  animation: transaction-row-loading 1.15s ease-in-out infinite;
}

body.transactions-page .transaction-loading-row i {
  width: 46px;
  height: 38px;
  border-radius: 4px;
}

body.transactions-page .transaction-loading-row b {
  width: min(160px, 88%);
  height: 13px;
}

body.transactions-page .transaction-loading-row small {
  width: min(120px, 70%);
  height: 10px;
}

body.transactions-page .transaction-loading-row .property-cell {
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
}

@keyframes transaction-row-loading {
  0% {
    background-position: 160% 0;
  }

  100% {
    background-position: -60% 0;
  }
}

body.transactions-page .transaction-status-pill {
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.68rem;
}

body.transactions-page .transaction-status-pill .dot {
  margin-right: 5px;
}

@media (max-width: 1120px) {
  body.transactions-page .transaction-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.transactions-page .lfn-dashboard .lfn-topbar {
    padding: 16px;
  }

  body.transactions-page .transaction-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.transactions-page .transaction-metric-card {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 66px;
    padding: 9px;
  }

  body.transactions-page .transaction-metric-card .summary-icon {
    width: 28px;
    height: 28px;
  }

  body.transactions-page .transaction-metric-card a {
    display: none;
  }

  body.transactions-page .transaction-metric-card a::after {
    content: none;
  }

  body.transactions-page .transactions-card {
    padding: 12px;
  }

  body.transactions-page .transactions-card > .card-header,
  body.transactions-page .transaction-card-actions,
  body.transactions-page .transaction-archive-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.transactions-page .transaction-archive-actions .compact-action {
    width: 100%;
  }

  body.transactions-page .transaction-search-panel {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  body.transactions-page .transaction-search-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    justify-items: stretch;
  }

  body.transactions-page .transaction-search-tools small {
    max-width: none;
    text-align: left;
  }

  body.transactions-page .transaction-search-tools .compact-action {
    width: 100%;
  }

  body.transactions-page .transaction-view-controls {
    width: 100%;
  }

  body.transactions-page .transaction-view-controls button {
    flex: 1 1 0;
  }

  body.transactions-page .transactions-card .modern-table {
    gap: 8px;
    border: 0;
    background: transparent;
  }

  body.transactions-page .transactions-card .modern-row:not(.modern-head) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    border: 1px solid #dfe8f1;
    border-radius: 4px;
    padding: 10px;
    box-shadow: none;
  }

  body.transactions-page .transactions-card .modern-row:not(.modern-head) > span {
    display: grid;
    justify-content: stretch;
    justify-items: start;
    gap: 2px;
    text-align: left;
  }

  body.transactions-page .transactions-card .modern-row:not(.modern-head) > span::before {
    font-size: 0.62rem;
  }

  body.transactions-page .transactions-card .modern-row:not(.modern-head) > .property-cell {
    grid-column: 1 / -1;
    border-bottom: 1px solid #edf1f6;
    padding-bottom: 8px;
  }

  body.transactions-page .transactions-card .modern-row:not(.modern-head) > .property-cell::before {
    content: none;
  }

  body.transactions-page .transactions-card .modern-row:not(.modern-head) > .property-cell {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  body.transactions-page .transactions-card .modern-row:not(.modern-head) > .transaction-row-status {
    grid-column: auto;
  }

  body.transactions-page .transaction-row-status small {
    display: none;
  }

  body.transactions-page .transaction-row-agent small,
  body.transactions-page .transaction-row-date small,
  body.transactions-page .transaction-row-money small {
    white-space: normal;
  }
}

@media (max-width: 380px) {
  body.transactions-page .transaction-summary-cards,
  body.transactions-page .transactions-card .modern-row:not(.modern-head) {
    grid-template-columns: 1fr;
  }
}

/* Broker listings admin grid polish */
.listings-admin-grid {
  grid-template-columns: minmax(0, 1fr);
}

.listing-form-card {
  width: 100%;
}

.listing-form-card > .card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.lfn-dashboard .listing-inventory.listing-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.listing-inventory.listing-card-grid .listing-inventory-card-item {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  padding: 0;
  background: #ffffff;
  color: var(--lfn-text);
  box-shadow: 0 10px 24px rgba(17, 39, 65, 0.06);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.listing-inventory.listing-card-grid .listing-inventory-card-item:hover,
.listing-inventory.listing-card-grid .listing-inventory-card-item:focus-visible {
  border-color: rgba(17, 28, 45, 0.24);
  box-shadow: 0 16px 34px rgba(17, 39, 65, 0.1);
  outline: 0;
  transform: translateY(-1px);
}

.listing-card-photo {
  position: relative;
  display: grid;
  min-height: 194px;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid #e6edf5;
  background:
    linear-gradient(135deg, rgba(17, 28, 45, 0.08), rgba(84, 123, 216, 0.12)),
    #eef5fb;
  color: var(--lfn-navy);
}

.listing-card-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 194px;
  object-fit: cover;
}

.listing-card-photo-empty {
  gap: 6px;
  align-content: center;
  text-align: center;
}

.listing-card-photo-empty span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #d5e4f1;
  border-radius: 50%;
  background: #ffffff;
  color: var(--lfn-navy);
  font-weight: 950;
}

.listing-card-photo-empty strong {
  color: var(--lfn-navy);
  font-size: 0.8rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.listing-photo-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(17, 28, 45, 0.84);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.listing-card-content {
  display: grid;
  gap: 11px;
  align-content: start;
  padding: 14px;
}

.listing-card-topline,
.listing-card-price-row,
.listing-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.listing-card-topline {
  flex-wrap: wrap;
}

.listing-status-pill,
.listing-visibility-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid #dfe8f1;
  border-radius: 999px;
  padding: 0 9px;
  background: #f8fbff;
  color: var(--lfn-text);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.listing-status-pill .dot {
  margin-right: 7px;
}

.listing-visibility-pill.is-public {
  border-color: #c8dfd2;
  background: #f1faf4;
  color: #17633a;
}

.listing-card-price-row {
  align-items: baseline;
}

.listing-card-price-row > strong {
  color: var(--lfn-navy);
  font-size: clamp(1.45rem, 2vw, 1.75rem);
  font-weight: 950;
  line-height: 1;
}

.listing-card-price-row > small {
  overflow: hidden;
  color: var(--lfn-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-card-title {
  display: grid;
  gap: 4px;
}

.listing-card-title h3 {
  margin: 0;
  color: var(--lfn-text);
  font-size: 1.02rem;
  line-height: 1.22;
}

.listing-card-title p {
  color: var(--lfn-muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.36;
}

.listing-card-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  background: #dfe8f1;
  gap: 1px;
}

.listing-card-facts:empty {
  display: none;
}

.listing-card-facts span {
  display: grid;
  gap: 3px;
  min-height: 58px;
  align-content: center;
  padding: 8px;
  background: #fbfdff;
}

.listing-card-facts small,
.listing-card-footer small {
  color: var(--lfn-muted);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.listing-card-facts strong,
.listing-card-footer strong {
  min-width: 0;
  overflow: hidden;
  color: var(--lfn-text);
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-card-footer {
  border-top: 1px solid #edf1f6;
  padding-top: 11px;
}

.listing-card-footer span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.listing-card-footer span:last-child {
  text-align: right;
}

.listing-inventory.listing-card-grid .listing-row-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid #edf1f6;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.listing-inventory.listing-card-grid .listing-row-actions .compact-action {
  min-width: 0;
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.listing-inventory.listing-card-grid .listing-row-actions .compact-action:first-child {
  border-color: var(--lfn-navy);
  background: var(--lfn-navy);
  color: #ffffff;
}

@media (min-width: 1480px) {
  .lfn-dashboard .listing-inventory.listing-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (max-width: 760px) {
  .lfn-dashboard .listing-inventory.listing-card-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .listing-card-photo,
  .listing-card-photo img {
    min-height: 168px;
  }

  .listing-card-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-inventory.listing-card-grid .listing-row-actions {
    grid-template-columns: 1fr;
  }

  .listing-card-footer,
  .listing-card-price-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .listing-card-footer span:last-child {
    text-align: left;
  }
}
