:root {
  font-family: "Source Sans 3", system-ui, -apple-system, sans-serif;
  color: #1a2328;
  background: #f8fbfc;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: #f8fbfc url("/pearl-glass-backdrop.png") center top / cover fixed;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
p {
  margin: 0;
}
.topbar {
  min-height: 64px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(224, 231, 230, 0.78);
  border-bottom: 1px solid rgba(214, 224, 223, 0.85);
  backdrop-filter: blur(24px) saturate(110%);
}
.brand {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #1b365d;
}
.small {
  font-size: 12px;
}
.subtle {
  color: #51636e;
  font-size: 14px;
}
.prototype-badge {
  background: #f7eddc;
  color: #7b541c;
  border: 1px solid #b37b284d;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
}
.shell {
  display: flex;
  min-height: calc(100vh - 64px);
}
.sidebar {
  width: 224px;
  flex: none;
  padding: 16px;
  background: rgba(224, 231, 230, 0.78);
  border-right: 1px solid #d6e0df;
  backdrop-filter: blur(24px);
}
.nav-label {
  padding: 0 12px;
  margin-bottom: 12px;
  color: #50656f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.sidebar nav {
  display: grid;
  gap: 4px;
}
.sidebar nav button {
  border: 0;
  border-radius: 12px;
  padding: 11px 12px;
  text-align: left;
  background: transparent;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
}
.sidebar nav button span {
  margin-left: 12px;
}
.sidebar nav button[aria-current="page"] {
  background: #e8f2f2;
  color: #2f6468;
}
.simple {
  margin-top: 32px;
  padding: 16px;
  background: #f7f4ed;
  border-radius: 16px;
  font-size: 14px;
  color: #1b365d;
}
.simple p {
  font-size: 12px;
  color: #51636e;
  line-height: 1.7;
  margin-top: 4px;
}
main {
  min-width: 0;
  flex: 1;
  padding: 32px;
  max-width: 1664px;
}
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 14px;
  color: #2f6468;
  font-weight: 600;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.025em;
  margin: 4px 0 8px;
}
h2 {
  font-size: 16px;
}
.actions {
  display: flex;
  gap: 8px;
}
.secondary,
.primary {
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
}
.secondary {
  background: white;
  border: 1px solid #e2e8f0;
  color: #475569;
}
.primary {
  border: 1px solid #2f6468;
  background: #2f6468;
  color: white;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.45fr);
  gap: 20px;
}
.card {
  border: 1px solid rgba(226, 233, 231, 0.9);
  background: rgba(235, 240, 238, 0.88);
  border-radius: 16px;
  padding: 20px;
  box-shadow:
    0 14px 38px rgba(26, 63, 92, 0.08),
    inset 0 1px rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.card-heading p {
  margin-top: 4px;
}
.search input,
input,
select {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 12px;
  padding: 9px 12px;
  color: #1a2328;
  max-width: 100%;
}
.search input {
  width: 224px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
  text-align: left;
  font-size: 14px;
}
th {
  padding: 12px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  text-transform: uppercase;
  color: #50656f;
  letter-spacing: 0.04em;
  font-size: 12px;
}
td {
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}
tr[data-id] {
  cursor: pointer;
}
tr[data-id]:hover,
tr.selected {
  background: #f2f8f8;
}
.pill {
  background: #e8f2f2;
  color: #2f6468;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.relationship-panel {
  height: 176px;
  padding: 16px;
  background-color: #f7faf9;

  border: 1px solid #e2e8f0;
  border-radius: 16px;
  color: #51636e;
  font-size: 14px;
  overflow: auto;
}
.profile-button {
  margin-top: 12px;
}
.detail-list {
  padding-left: 20px;
  color: #475569;
  font-size: 14px;
}
.detail-list li {
  margin: 8px 0;
}
.activity-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-list button {
  margin-left: 8px;
}
#contact-dialog,
#event-dialog,
#opportunity-dialog {
  max-height: 90vh;
  overflow-y: auto;
}
#contact-dialog h3,
#event-dialog h3,
#opportunity-dialog h3 {
  font-size: 14px;
  margin: 20px 0 8px;
}
.side-cards {
  display: grid;
  gap: 20px;
  align-content: start;
}
.next-card {
  border-radius: 16px;
  background: #1b365d;
  color: white;
  padding: 20px;
  box-shadow: 0 5px 14px #1b365d1a;
}
.next-card p {
  color: #cbd5e1;
  font-size: 14px;
}
.next-card h2 {
  font-size: 20px;
  margin: 8px 0;
}
.next-card button {
  margin-top: 16px;
  color: #1b365d;
}
.empty {
  padding: 20px 0;
  color: #51636e;
  font-size: 14px;
}
.add-record {
  margin-top: 16px;
  color: #2f6468;
  font-size: 14px;
}
.add-record summary {
  cursor: pointer;
  font-weight: 700;
}
form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
}
dialog {
  border: 0;
  border-radius: 16px;
  max-width: 500px;
  width: calc(100% - 32px);
  padding: 24px;
  box-shadow: 0 20px 60px #0f172a55;
}
dialog::backdrop {
  background: #0f172a59;
}
.dialog-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.icon-button {
  background: none;
  border: 0;
  font-size: 24px;
  color: #51636e;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
#notice:not(:empty) {
  padding: 8px 0;
  color: #245a54;
}
@media (max-width: 1000px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: 180px;
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    width: auto;
    padding: 8px;
    overflow: auto;
  }
  .sidebar nav {
    display: flex;
  }
  .sidebar nav button {
    white-space: nowrap;
  }
  .sidebar .nav-label,
  .simple {
    display: none;
  }
  main {
    padding: 20px;
  }
  .title-row {
    align-items: start;
    flex-direction: column;
  }
  .topbar {
    padding: 0 20px;
  }
  .prototype-badge {
    font-size: 10px;
  }
}

/* Compact, readable linked Outlook activity in record details. */
#contact-dialog,
#opportunity-dialog {
  max-width: 880px;
  box-sizing: border-box;
}
#contact-dialog > .dialog-title,
#opportunity-dialog > .dialog-title {
  position: sticky;
  top: -24px;
  z-index: 2;
  background: #fff;
  padding: 12px 0;
}
.email-history {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}
.email-card {
  border: 1px solid #d9e2e5;
  border-radius: 10px;
  padding: 14px;
  color: #334155;
  overflow-wrap: anywhere;
}
.email-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.email-status {
  font-size: 12px;
  color: #35696d;
  background: #e8f2f1;
  border-radius: 99px;
  padding: 4px 9px;
}
.email-date,
.email-reply,
.email-details p {
  margin: 8px 0;
  font-size: 13px;
  color: #51636e;
}
.email-reply {
  padding: 10px;
  border-radius: 8px;
  background: #f4f7f7;
  color: #334155;
}
.email-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 10px 0;
  font-size: 13px;
}
.email-details summary,
#contact-email-picker > summary,
#opportunity-email-picker > summary {
  cursor: pointer;
  color: #35696d;
  font-weight: 600;
}
.email-details {
  font-size: 13px;
  margin: 10px 0;
}
.email-empty {
  color: #51636e;
  font-size: 14px;
}
#contact-email-picker,
#opportunity-email-picker {
  margin: 14px 0;
}
@media (max-width: 700px) {
  #contact-dialog,
  #opportunity-dialog {
    width: calc(100% - 24px);
    padding: 18px;
  }
  #contact-dialog > .dialog-title,
  #opportunity-dialog > .dialog-title {
    top: -18px;
  }
}

.pipeline-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  align-items: flex-start;
  padding: 12px 0;
}
.pipeline-column {
  flex: 0 0 225px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
  padding: 12px;
  min-height: 140px;
}
.pipeline-column h3 {
  margin: 0 0 6px;
}
.pipeline-card {
  background: white;
  border: 1px solid #dbe7e5;
  border-radius: 10px;
  margin-top: 10px;
  padding: 12px;
}
.pipeline-card p {
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.pipeline-card select {
  width: 100%;
  margin-top: 4px;
}
.pipeline-open {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: #255e64;
  font-weight: 700;
  cursor: pointer;
  overflow-wrap: anywhere;
}

/* Shared property, home-sales and field-service workspaces. */
[hidden] {
  display: none !important;
}
.workspace-picker {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
}
.workspace-picker select {
  min-width: 150px;
  margin: 0;
}
.field-workspace {
  width: 100%;
  min-width: 0;
  padding-bottom: 3rem;
}
.field-heading,
.field-dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}
.field-heading h2 {
  font-size: 1.75rem;
  margin: 0 0 0.4rem;
}
.field-heading p {
  max-width: 700px;
}
.field-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0;
}
.field-actions > input,
.field-actions > select {
  width: auto;
  max-width: 100%;
  min-width: 180px;
}
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 1.3rem;
}
.property-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.property-card h3 {
  font-size: 1.25rem;
  margin: 0.3rem 0;
}
.property-card button {
  align-self: flex-start;
  margin-top: auto;
}
.field-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.field-metric {
  background: #fff;
  border: 1px solid #dce7ed;
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field-metric strong {
  font-size: 1.65rem;
  color: #086d88;
}
.field-metric span {
  font-size: 0.85rem;
  color: #586d7a;
}
.field-dialog {
  width: min(1040px, 94vw);
  max-width: 94vw;
  max-height: 91vh;
  overflow: auto;
  border: 1px solid #d2e1e7;
  border-radius: 18px;
  padding: 1.5rem;
}
.field-dialog::backdrop {
  background: #16344285;
}
.field-dialog-heading {
  position: sticky;
  top: -1.5rem;
  background: #fff;
  padding: 1rem 0;
  z-index: 2;
  border-bottom: 1px solid #e0e9ee;
}
.field-dialog h3 {
  margin-top: 1.8rem;
}
.field-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  padding: 1.2rem;
}
.field-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
}
.field-form input,
.field-form select,
.field-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.field-form textarea {
  min-height: 90px;
  resize: vertical;
}
.field-form > .form-status,
.field-form > .parcel-preview,
.field-form > .address-matches,
.field-form > .slot-suggestions,
.field-form > .route-choices {
  grid-column: 1/-1;
}
.field-inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1rem;
  margin: 1.2rem 0;
  padding: 1rem;
  background: #f5f9fb;
  border-radius: 12px;
}
.field-inline-form label {
  flex: 1;
  min-width: 180px;
}
.field-inline-form .form-status {
  flex-basis: 100%;
}
.parcel-outline {
  display: block;
  width: 100%;
  height: 220px;
  max-width: 700px;
  background: #eef6f8;
  border: 1px solid #d5e6ec;
  border-radius: 12px;
  margin: 1rem 0;
}
.parcel-outline path {
  stroke: #087c9c;
  stroke-width: 2;
  fill: #39aac13b;
  vector-effect: non-scaling-stroke;
}
.property-map {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
}
.property-map-container {
  margin: 1rem 0;
}
.property-notes,
.message-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message-preview {
  padding: 1.2rem;
  background: #f2f7fa;
  border-radius: 12px;
  font: inherit;
  line-height: 1.65;
}
.record-tag {
  display: inline-block;
  background: #eaf5f7;
  color: #17677d;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
}
.linked-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #e0e8ed;
}
.link-button {
  background: transparent;
  border: 0;
  color: #076e8b;
  text-align: left;
  padding: 0.55rem 0;
  display: block;
  cursor: pointer;
}
.linked-row .link-button {
  flex: 1;
}
.appointment-list {
  display: grid;
  gap: 1rem;
}
.appointment-card {
  padding: 1.3rem;
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
}
.appointment-card h3,
.appointment-card p {
  margin: 0;
}
.appointment-card .subtle {
  grid-column: 2;
}
.appointment-time {
  font-weight: 600;
  color: #1a657a;
}
.route-choices label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
}
.route-choices input {
  width: auto;
}
.route-stops li {
  padding: 0.7rem 0;
  border-bottom: 1px solid #e1e9ed;
}
.route-stops p {
  margin: 0.35rem 0;
}
.confirmation-body { background: #eef2f4; min-height: 100vh; margin: 0; }
.confirmation-page { --confirm-brand: #2f6468; max-width: 460px; margin: 0 auto; padding: 6vh 16px 32px; }
.confirmation-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 1.2rem; color: var(--confirm-brand); }
.confirmation-brand img { max-height: 44px; max-width: 220px; }
.confirmation-card { background: #fff; border: 1px solid #dce6e8; border-top: 5px solid var(--confirm-brand); border-radius: 12px; padding: 22px 22px 18px; box-shadow: 0 6px 24px rgba(20, 40, 50, 0.08); }
.confirmation-card h1 { margin: 0 0 14px; font-size: 1.4rem; }
.confirmation-visit { display: grid; gap: 10px; margin: 0 0 16px; padding: 14px; border-radius: 10px; background: #f5f8f9; }
.confirmation-visit div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.confirmation-visit dt { color: #5b6d74; font-size: 0.9rem; }
.confirmation-visit dd { margin: 0; font-weight: 600; }
.confirmation-lead { margin: 0 0 14px; }
.confirmation-card .primary { width: 100%; background: var(--confirm-brand); border-color: var(--confirm-brand); }
.confirmation-status:empty { display: none; }
.confirmation-status { font-weight: 600; color: #1d6b3a; }
.confirmation-help { margin: 14px 0 0; color: #5b6d74; font-size: 0.9rem; }
@media (max-width: 420px) { .confirmation-visit div { grid-template-columns: 1fr; gap: 2px; } }
.history-line {
  padding: 0.7rem 0;
  border-bottom: 1px solid #e0e9ed;
}
.empty-state {
  padding: 1.5rem;
  color: #607482;
}
.field-workspace > .card {
  padding: 1.4rem;
  margin: 1rem 0;
}
.address-matches button,
.slot-suggestions button {
  display: block;
  margin: 0.5rem 0;
  text-align: left;
}
@media (max-width: 900px) {
  .field-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar {
    flex-wrap: wrap;
    gap: 0.8rem;
  }
  .appointment-card {
    grid-template-columns: 1fr;
  }
  .appointment-card .subtle {
    grid-column: auto;
  }
  .field-heading {
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .field-form {
    grid-template-columns: 1fr;
    padding: 0.5rem;
  }
  .field-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .field-metric strong {
    font-size: 1.3rem;
  }
  .field-dialog {
    padding: 1rem;
  }
  .field-dialog-heading {
    top: -1rem;
  }
  .workspace-picker select {
    min-width: 130px;
  }
  .property-grid {
    grid-template-columns: 1fr;
  }
}

/* Strata's existing pearl-glass shell; solid work surfaces keep records legible. */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/source-sans-3-400-normal.ttf') format('truetype'); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/montserrat-600-normal.ttf') format('truetype'); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/montserrat-700-normal.ttf') format('truetype'); }
:root { color-scheme: light; color: #23343b; font-size: 16px; }
body { display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow: hidden; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #2f6468; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .6; }
button, summary { touch-action: manipulation; }
button, input, select { min-height: 40px; }
h1, h2, h3, .brand { font-family: Montserrat, system-ui, sans-serif; }
h1 { font-size: clamp(24px, 2.5vw, 30px); line-height: 1.25; margin: 0; }
h2 { font-size: 17px; line-height: 1.4; }
h3 { font-size: 15px; line-height: 1.4; }
.subtle { color: #51636e; line-height: 1.5; }
.topbar { flex: none; gap: 16px; min-height: 64px; padding: 10px 24px; background: #f5f9f9; border-color: #d8e3e4; backdrop-filter: none; }
.product-brand { display: flex; align-items: center; flex: none; gap: 12px; color: #2f6468; text-decoration: none; font-size: 16px; font-weight: 600; }
.product-brand img { display: block; width: 134px; height: auto; }
.product-brand span { padding-left: 12px; border-left: 1px solid #c6d9db; }
.auth-controls { display: flex; align-items: center; gap: 8px; }
.prototype-badge { padding: 4px 10px; font-size: 12px; white-space: normal; }
.workspace-picker { color: #465e63; font-size: 13px; }
.workspace-picker select { min-width: 148px; border-radius: 9px; }
.shell { flex: 1; min-height: 0; overflow: hidden; }
.sidebar { width: 196px; padding: 18px 12px; overflow-y: auto; background: #f5f9f9; border-color: #d8e3e4; backdrop-filter: none; }
.nav-label { padding: 0 12px; font-size: 11px; line-height: 1.4; color: #50656f; letter-spacing: .1em; }
.sidebar nav button { min-height: 44px; border-radius: 10px; padding: 10px 12px; font-size: 15px; color: #3d535f; }
.sidebar nav button span { margin-left: 8px; }
.sidebar nav button:hover { background: #edf4f4; }
.sidebar nav button[aria-current=page] { background: #e1eeee; color: #28585c; }
.simple { display: none; }
main { padding: 22px 24px 32px; overflow: auto; scrollbar-gutter: stable; min-height: 0; }
.title-row { align-items: center; flex-wrap: wrap; margin-bottom: 18px; gap: 12px 20px; }
.title-row > div:first-child { flex: 1 1 180px; }
.eyebrow { font-size: 12px; line-height: 1.4; color: #2f6468; margin-bottom: 4px; }
.section-help { display: none; }
.actions { flex-wrap: wrap; align-items: center; gap: 8px; }
.actions > button { white-space: nowrap; }
.secondary, .primary { font-size: 14px; font-weight: 600; padding: 8px 13px; border-radius: 9px; min-height: 40px; line-height: 1.3; }
.secondary { color: #344f5a; border-color: #cddcdf; background: #fff; }
.secondary:hover { background: #f1f7f7; border-color: #a7c3c5; }
.primary { background: #2f6468; border-color: #2f6468; }
.primary:hover { background: #28585c; border-color: #28585c; }
.content-grid { grid-template-columns: minmax(0,1fr) minmax(260px,.42fr); gap: 20px; }
.content-grid.single-panel { grid-template-columns: minmax(0,1fr); }
.card { background: #fff; border-color: #d5e1e3; padding: 20px; box-shadow: 0 8px 24px rgba(47,100,104,.06); backdrop-filter: none; }
.card-heading { flex-wrap: wrap; align-items: start; gap: 12px; }
.card-heading .search { margin-left: auto; }
.search input { width: min(260px, 100%); border-radius: 9px; }
input, select, textarea { border: 1px solid #c8d7dc; border-radius: 9px; background: #fff; color: #23343b; }
textarea { padding: 10px 12px; max-width: 100%; }
table { min-width: 560px; font-size: 15px; }
th { color: #50656f; padding: 12px 10px; background: #f6f9fa; border-color: #dce6e8; font-size: 11px; }
td { padding: 14px 10px; border-color: #e4ecee; vertical-align: top; }
td:first-child { color: #263f4b; font-weight: 600; }
tr[data-id]:hover, tr.selected { background: #edf6f5; }
.relationship-panel { min-height: 100px; height: auto; max-height: 220px; padding: 14px; border-radius: 10px; color: #465e63; }
.relationship-panel ul { padding-left: 20px; margin: 8px 0 0; }
.side-cards { gap: 16px; }
.next-card { background: #edf5f4; color: #244c50; border: 1px solid #cddfe0; box-shadow: none; }
.next-card p { color: #48656a; }
.next-card h2 { font-size: 17px; line-height: 1.5; }
.next-card button { color: #2f6468; margin-top: 12px; }
.workspace-tools { position: relative; }
/* Pest businesses keep their email templates under Communications. */
/* Pest: Email templates live under Communications, and the rest of Workspace tools
   (saved views, sales follow-up rules, drafts) is for the sales tools, so the button is not shown. */
body.pest-tenant #workspace-tools { display: none; }
.workspace-tools > summary { list-style: none; cursor: pointer; min-height: 40px; padding: 8px 13px; border: 1px solid #cddcdf; border-radius: 9px; background: #fff; color: #344f5a; font-size: 14px; font-weight: 600; }
.workspace-tools > summary::-webkit-details-marker { display: none; }
.workspace-tools[open] > summary { background: #edf5f4; border-color: #a7c3c5; }
.tools-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 210px; padding: 6px; border: 1px solid #cddcdf; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgba(29,60,71,.14); display: grid; gap: 3px; }
.tools-panel button { text-align: left; border: 0; min-height: 42px; }
.tools-panel button:hover { background: #edf5f4; }
dialog, #contact-dialog, #opportunity-dialog, .field-dialog { position: fixed; inset: 0; margin: auto; padding: 20px; max-height: calc(100dvh - 24px); max-width: min(920px,calc(100vw - 24px)); width: calc(100% - 24px); overflow: auto; overscroll-behavior: contain; background: #fff; color: #23343b; border: 1px solid #cddcdf; border-radius: 16px; box-shadow: 0 24px 70px rgba(25,50,58,.24); }
dialog:not(#contact-dialog):not(#opportunity-dialog):not(#timeline-dialog):not(.field-dialog) { max-width: min(640px,calc(100vw - 24px)); }
dialog::backdrop, .field-dialog::backdrop { background: rgba(25,50,58,.34); }
.dialog-title, #contact-dialog > .dialog-title, #opportunity-dialog > .dialog-title, .field-dialog-heading { position: sticky; top: -20px; z-index: 2; align-items: flex-start; gap: 16px; margin: -20px 0 18px; padding: 20px 0 14px; border-bottom: 1px solid #dce6e8; background: #fff; }
.dialog-title > div { min-width: 0; }
.dialog-title h2, .field-dialog-heading h2 { font-size: 20px; line-height: 1.4; margin: 0; }
.dialog-title .icon-button, .field-dialog-heading > button { flex: none; min-width: 44px; min-height: 44px; border: 1px solid #d7e2e5; border-radius: 9px; }
#contact-meta { margin-top: 4px; overflow-wrap: anywhere; }
.record-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 16px 0; }
.record-summary > div { padding: 12px; border: 1px solid #dce6e8; border-radius: 10px; background: #f6f9f9; }
.record-summary dt { color: #51636e; font-size: 12px; margin-bottom: 5px; }
.record-summary dd { color: #263f4b; font-size: 14px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.record-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.record-disclosure { margin: 12px 0; }
.record-disclosure > summary, dialog > details > summary { cursor: pointer; color: #2f6468; padding: 10px 0; font-weight: 600; }
.record-actions { position: sticky; bottom: -20px; margin: 20px 0 -20px; padding: 14px 0 20px; border-top: 1px solid #dce6e8; background: #fff; }
.activity-timeline { display: grid; gap: 10px; list-style: none; padding: 0; margin: 12px 0 20px; }
.activity-timeline > li { padding: 14px 16px; border: 1px solid #dce6e8; border-left: 3px solid #91b7b9; border-radius: 9px; background: #fff; }
.activity-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin-bottom: 7px; color: #51636e; font-size: 12px; }
.activity-kind { color: #2f6468; font-weight: 600; }
.activity-timeline p, .activity-timeline summary { line-height: 1.6; font-size: 15px; }
.activity-timeline a { display: inline-block; color: #2f6468; margin-top: 8px; }
.activity-timeline details > summary { cursor: pointer; }
.detail-list li { line-height: 1.6; }
#contact-tasks { list-style: none; padding: 0; }
#contact-tasks li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px solid #dce6e8; border-radius: 9px; }
#contact-tasks li button { margin-left: auto; flex: none; }
.field-workspace { padding-bottom: 0; }
.field-heading { align-items: start; gap: 12px; margin: 0 0 18px; }
.field-heading h2 { display: none; }
.field-heading .field-actions { margin: 0; flex: none; }
.field-metrics { gap: 12px; margin: 18px 0; }
.field-metric { padding: 16px; border-color: #d5e1e3; border-radius: 12px; gap: 3px; }
.field-metric strong { color: #2f6468; font-size: 24px; }
.field-actions { gap: 8px; margin: 14px 0; }
.property-grid { grid-template-columns: repeat(auto-fill,minmax(min(260px,100%),1fr)); gap: 16px; margin-top: 16px; }
.property-card { padding: 20px; gap: 7px; }
.property-card h3 { font-size: 17px; }
.property-card .eyebrow { font-size: 11px; }
.property-card .subtle { font-size: 14px; }
.field-form { padding: 18px; gap: 16px; }
.field-form label { font-size: 14px; }
.field-form .primary { justify-self: start; }
.field-form input, .field-form select { min-height: 44px; }
.message-preview { background: #f5f8f9; border: 1px solid #dce6e8; font-size: 15px; line-height: 1.65; }
.route-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.route-comparison { width: 100%; min-width: 520px; }
.route-comparison caption { text-align: left; color: #263f4b; font-weight: 600; margin: 12px 0; }
.route-note { padding: 12px 14px; background: #edf5f4; border: 1px solid #cddfe0; border-radius: 9px; font-size: 14px; line-height: 1.55; }
.skip-link { position: fixed; left: 16px; top: -70px; z-index: 10; padding: 10px 16px; color: #fff; background: #2f6468; border-radius: 8px; }
.skip-link:focus { top: 8px; }
@supports ((backdrop-filter: blur(22px)) or (-webkit-backdrop-filter: blur(22px))) {
  .topbar, .sidebar { background: rgba(255,255,255,.78); -webkit-backdrop-filter: blur(22px) saturate(115%); backdrop-filter: blur(22px) saturate(115%); }
}
@media (max-width: 1200px) {
  .content-grid { grid-template-columns: minmax(0,1fr); }
  .side-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sidebar { width: 180px; }
}
@media (max-width: 900px) {
  .topbar { gap: 8px 16px; }
  .product-brand img { width: 112px; }
  .prototype-badge { max-width: 220px; }
  .title-row { align-items: start; }
  .title-row > .actions { width: 100%; }
  .field-heading { flex-direction: row; flex-wrap: wrap; }
  .field-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .topbar { padding: 10px 14px; }
  .product-brand { gap: 8px; }
  .product-brand img { width: 108px; }
  .product-brand span { padding-left: 8px; }
  .auth-controls { margin-left: auto; }
  .prototype-badge { max-width: 200px; font-size: 11px; }
  .workspace-picker { margin-left: auto; font-size: 12px; }
  .workspace-picker select { min-width: 136px; }
  .shell { display: flex; flex-direction: column; }
  .sidebar { flex: none; width: 100%; max-height: 68px; overflow: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid #d8e3e4; }
  .sidebar nav { display: flex; gap: 5px; }
  .sidebar nav button { padding: 10px 12px; min-height: 44px; flex: none; }
  main { padding: 18px 14px 24px; }
  .title-row { flex-direction: row; gap: 10px; margin-bottom: 16px; }
  .title-row > div:first-child { flex-basis: 100%; }
  .side-cards, .record-summary { grid-template-columns: minmax(0,1fr); }
  .card { padding: 16px; }
  .card-heading .search { width: 100%; margin-left: 0; }
  .search input { width: 100%; }
  .secondary, .primary, .workspace-tools > summary { min-height: 44px; }
  dialog, #contact-dialog, #opportunity-dialog, .field-dialog { padding: 16px; max-height: calc(100dvh - 16px); max-width: calc(100vw - 16px); width: calc(100vw - 16px); }
  .dialog-title, #contact-dialog > .dialog-title, #opportunity-dialog > .dialog-title, .field-dialog-heading { top: -16px; padding: 16px 0 12px; margin-top: -16px; }
  .record-actions { bottom: -16px; margin-bottom: -16px; padding-bottom: 16px; }
  .field-form { padding: 0; grid-template-columns: minmax(0,1fr); }
  .field-metric { padding: 14px; }
  .field-metric strong { font-size: 21px; }
  .route-metrics { grid-template-columns: minmax(0,1fr); }
  .tools-panel { left: 0; right: auto; }
}
@media (prefers-reduced-transparency: reduce) {
  .topbar, .sidebar { background: #f5f9f9; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .topbar, .sidebar, .card, dialog, .field-metric, .next-card, .tools-panel { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  :focus-visible { outline-color: Highlight; }
}
.embedded-crm .product-brand, .embedded-crm .auth-controls { display: none; }
.embedded-crm .topbar { min-height: 56px; justify-content: flex-start; }
.embedded-crm .workspace-picker { margin-left: 0; }
/* Contact records use the reference's persistent identity / tabs / associations.
   Glass stays on the Strata shell; record surfaces stay opaque and readable. */
main.record-open { padding: 24px; max-width: none; background: #f0f3f3; }
main.record-open > .title-row, main.record-open > .content-grid, main.record-open > #notice:empty { display: none; }
#contact-dialog.contact-record { position: static; inset: auto; overflow: visible; box-shadow: none; border-radius: 0; display: grid; grid-template-columns: 280px minmax(0,1fr) 260px; gap: 20px; width: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; outline: none; }
#contact-dialog.contact-record[hidden] { display: none; }
.record-column { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.record-card { background: #fff; border: 1px solid #d6dfe0; border-radius: 16px; box-shadow: 0 2px 5px #183d4210; padding: 24px; min-width: 0; overflow-wrap: anywhere; }
.record-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.record-card-heading h2 { font-size: 16px; line-height: 1.4; font-weight: 700; }
.record-card h3 { font-size: 15px; }
.record-card p { line-height: 1.6; }
.identity-card { padding: 0; }
.identity-card .record-card-heading { padding: 14px 18px; margin: 0; border-bottom: 1px solid #d6dfe0; }
.identity-body { padding: 24px 20px; }
.identity-body h1 { font-size: 22px; line-height: 1.35; margin: 8px 0; font-weight: 700; }
.contact-avatar { width: 38px; height: 38px; border-radius: 50%; background: #edf2f2; display: flex; align-items: center; justify-content: center; }
.contact-avatar img { width: 22px; height: 22px; }
.text-button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 6px; padding: 6px 3px; min-height: 36px; color: #2f6468; background: transparent; font: inherit; font-weight: 600; text-align: left; }
.text-button:hover { background: #edf4f3; }
.text-button img { width: 18px; height: 18px; }
.contact-quick-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 20px; }
.contact-quick-actions > * { padding: 0; border: 0; background: transparent; color: #263f4b; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 44px; font-size: 13px; cursor: pointer; }
.contact-quick-actions img { width: 40px; height: 40px; padding: 9px; border: 1px solid #b7c8cb; border-radius: 50%; background: #fff; }
.contact-quick-actions > *:hover img { background: #edf4f3; }
.contact-quick-actions [aria-disabled="true"] { opacity: .55; cursor: default; }
.key-information { display: grid; gap: 20px; margin: 0; }
.key-information dt, .profile-grid dt { font-size: 14px; color: #526269; margin: 0 0 5px; }
.key-information dd, .profile-grid dd { font-size: 15px; color: #26383e; line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
#contact-edit-details { margin-top: 18px; }
#contact-edit-details > summary { padding: 10px 0; color: #2f6468; cursor: pointer; }
#contact-update { display: grid; gap: 12px; margin-top: 12px; }
.record-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border: 1px solid #ccd7d9; border-radius: 9px 9px 0 0; overflow: hidden; background: #f4f6f6; }
.record-tabs button { border: 0; border-right: 1px solid #ccd7d9; border-radius: 0; padding: 17px 10px; min-height: 54px; color: #3a4b52; background: transparent; font-size: 15px; font-weight: 600; }
.record-tabs button:last-child { border-right: 0; }
.record-tabs button[aria-selected="true"] { background: #fff; color: #234e52; box-shadow: inset 0 -3px #2f6468; }
.record-center > [role="tabpanel"] { display: grid; gap: 18px; }
.record-center > [role="tabpanel"][hidden] { display: none; }
#contact-status:empty { display: none; }
#contact-status:not(:empty) { padding: 12px 16px; background: #eaf4f2; border: 1px solid #bad3ce; border-radius: 8px; }
.summary-source { margin: 0 0 16px; }
.summary-source strong { display: block; font-size: 13px; margin-bottom: 4px; color: #43616a; }
.summary-source span { display: block; }
#contact-summary-sources { margin-top: 18px; }
.profile-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px 18px; margin: 0; }
#contact-intelligence { grid-template-columns: repeat(2,minmax(0,1fr)); }
.contact-record .record-summary { grid-template-columns: 1fr; margin-top: 16px; }
.contact-record .record-summary > div { border: 0; padding: 0; background: transparent; }
.association-list { padding: 0; margin: 0; list-style: none; }
.association-item { border: 1px solid #dce4e5; border-radius: 12px; padding: 16px; margin: 14px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.association-item p, .association-item > a { flex-basis: 100%; }
.association-item a { color: #2f6468; }
.association-item .pill { margin-left: auto; }
.contact-record .record-disclosure > summary { font-size: 14px; }
.activity-toolbar { display: grid; gap: 16px; }
.activity-kinds { display: flex; flex-wrap: wrap; gap: 5px; border-bottom: 1px solid #d3dddf; }
.activity-kinds button { border: 0; padding: 12px 8px; min-height: 44px; font-size: 14px; background: transparent; color: #42575e; font-weight: 600; }
.activity-kinds button[aria-pressed="true"] { box-shadow: inset 0 -3px #2f6468; color: #234e52; }
#contact-activity-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#contact-activity-filter .search { flex: 1; min-width: 140px; }
#contact-activity-filter input { width: 100%; }
.contact-record .record-tools { margin: 0; }
.contact-record .activity-timeline { margin-top: 0; }
.contact-record .activity-timeline > li { border: 1px solid #d2dddd; border-radius: 14px; padding: 20px 24px; box-shadow: 0 2px 5px #183d4210; }
.contact-record .activity-timeline > .timeline-month { padding: 6px 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; font-weight: 600; font-size: 19px; color: #3a4b52; }
.contact-record .activity-meta { font-size: 13px; margin-bottom: 10px; }
.enrichment-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.enrichment-banner > div { flex: 1; min-width: 160px; }
.enrichment-banner > .subtle { flex-basis: 100%; }
.enrichment-review + .enrichment-review { border-top: 1px solid #dce4e5; margin-top: 24px; padding-top: 18px; }
.enrichment-review > a { display: inline-block; margin: 8px 0 14px; color: #2f6468; }
.enrichment-table { min-width: 420px; }
.enrichment-table th, .enrichment-table td { white-space: normal; overflow-wrap: anywhere; padding: 10px; }
.enrichment-table input { width: 20px; height: 20px; }
.enrichment-review .record-tools { margin-top: 16px; }
.record-hint { font-size: 14px; line-height: 1.65; color: #52666b; }
#contact-revenue { display: grid; gap: 18px; }
.record-editor-form { display: grid; gap: 16px; }
.record-editor-form label { display: grid; gap: 6px; font-size: 14px; }
.record-editor-form textarea { min-height: 100px; padding: 10px 12px; border: 1px solid #cbd9dc; border-radius: 9px; font: inherit; resize: vertical; }
@media (max-width: 1200px) {
  #contact-dialog.contact-record { grid-template-columns: minmax(230px,.95fr) minmax(390px,1.9fr); gap: 18px; }
  .record-associations { grid-column: 2; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .record-identity { grid-row: span 2; }
}
@media (max-width: 1000px) {
  main.record-open { padding: 18px; }
  #contact-dialog.contact-record { grid-template-columns: 210px minmax(0,1fr); gap: 14px; }
  .record-card { padding: 18px; }
  .identity-body { padding: 18px 16px; }
  .identity-body h1 { font-size: 20px; }
  .record-tabs button { font-size: 13px; padding: 14px 5px; }
  .profile-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .contact-quick-actions { gap: 6px; }
  .record-associations { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  #contact-dialog.contact-record { grid-template-columns: minmax(0,1fr); }
  .record-identity { grid-row: auto; }
  .record-identity > .record-card:not(.identity-card) { order: 2; }
  .record-associations { grid-column: auto; }
  .record-tabs { position: sticky; top: 0; z-index: 1; }
  .key-information { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .contact-quick-actions { max-width: 370px; }
  .contact-quick-actions > * { min-height: 64px; }
  .record-tabs button { font-size: 14px; min-height: 48px; }
  .record-card { padding: 18px; }
  .identity-card { padding: 0; }
  .record-center { order: 1; }
  .record-identity { display: contents; }
  .record-identity .identity-card { order: 0; }
  .record-identity > .record-card:not(.identity-card) { order: 2; }
  .record-associations { order: 3; }
  main.record-open { padding: 14px; }
  .record-card-heading { flex-wrap: wrap; }
  .profile-grid, #contact-intelligence { gap: 18px 12px; }
  .contact-record .activity-timeline > li { padding: 18px; }
  .text-button { min-height: 44px; }
}
@media (forced-colors: active) { .record-card, .record-tabs { background: Canvas; border-color: CanvasText; } .record-tabs button[aria-selected="true"] { border-bottom: 3px solid Highlight; } }

.record-card-heading > .text-button { flex: none; white-space: nowrap; }

@media (min-width: 1201px) {
  .record-identity, .record-associations { position: sticky; top: 0; align-self: start; max-height: calc(100dvh - 112px); overflow-y: auto; padding-bottom: 4px; }
  .embedded-crm .record-identity, .embedded-crm .record-associations { max-height: calc(100dvh - 104px); }
}
#contact-activity-filter > label:not(.search) { display: grid; gap: 4px; font-size: 13px; color: #52666b; }

/* Business demos share a visual system, while menus and records stay separate. */
.business-samples .topbar { gap: 20px; padding: 12px 24px; min-height: 76px; }
.business-samples .workspace-picker { display: grid; gap: 3px; flex: 1; max-width: 460px; color: #4c6268; font-size: 12px; }
.business-samples .workspace-picker select { width: 100%; min-width: 0; height: 38px; background: #fff; font-size: 14px; color: #203e47; }
.business-samples .prototype-badge { background: #edf4f3; color: #37615d; border-color: #d0dfdc; }
.business-samples .shell { min-height: 0; }
.business-samples .sidebar { width: 218px; background: #183f48; padding: 22px 12px; border-right: 0; }
.business-samples .nav-label { color: #dae7e8; font-size: 13px; line-height: 1.5; letter-spacing: 0; padding: 0 14px 18px; margin: 0 0 12px; border-bottom: 1px solid #ffffff26; }
.business-samples .sidebar nav { gap: 5px; }
.business-samples .sidebar nav button { color: #e1eded; display: flex; align-items: center; gap: 13px; padding: 12px 14px; min-height: 46px; border-radius: 8px; font-size: 15px; font-weight: 400; }
.business-samples .sidebar nav button img { width: 19px; height: 19px; filter: brightness(0) invert(1); opacity: .85; flex: none; }
.business-samples .sidebar nav button span { margin: 0; }
.business-samples .sidebar nav button:hover { background: #28515a; }
.business-samples .sidebar nav button[aria-current='page'] { color: #fff; background: #39636c; font-weight: 600; }
.business-samples .simple { display: block; margin: 32px 8px 0; padding: 16px 8px 0; border-top: 1px solid #ffffff26; border-radius: 0; background: transparent; color: #e0ecec; font-size: 12px; }
.business-samples .simple p { color: #b7ced2; font-size: 12px; line-height: 1.55; }
.business-samples main { padding: 28px; max-width: none; background: #f3f5f5; }
.business-samples .title-row { margin-bottom: 24px; align-items: center; }
.business-samples .title-row h1 { font-size: 28px; line-height: 1.25; margin: 6px 0; }
.business-samples .title-row .section-help { max-width: 680px; font-size: 14px; line-height: 1.5; }
.business-samples .content-grid { gap: 20px; }
.business-samples .main-card { border-radius: 14px; box-shadow: 0 1px 4px #163d4410; padding: 0; overflow: hidden; }
.business-samples .main-card > .card-heading { padding: 20px 24px; margin: 0; border-bottom: 1px solid #dce3e4; align-items: center; gap: 18px; }
.business-samples .main-card .search { width: 280px; max-width: 100%; }
.business-samples .main-card .search input { min-height: 40px; width: 100%; }
.business-samples th { background: #f5f8f8; color: #4e626b; font-size: 12px; letter-spacing: .025em; font-weight: 600; }
.business-samples td { padding: 18px 20px; font-size: 14px; vertical-align: middle; }
.business-samples tr[data-id]:hover { background: #f1f7f6; }
.business-samples .contact-row-identity { display: flex; align-items: center; gap: 13px; min-width: 210px; }
.business-samples .contact-row-copy { display: grid; gap: 3px; }
.business-samples .contact-row-copy strong { color: #24616a; font-size: 15px; font-weight: 600; }
.business-samples .contact-row-copy .subtle { font-size: 12px; }
.business-samples .contact-row-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; background: #e8efee; }
.business-samples .add-record { margin: 0; padding: 0 24px; border-top: 1px solid #e0e6e7; }
.business-samples .add-record > summary { min-height: 52px; padding: 16px 0; font-size: 14px; color: #2c646b; }
.business-samples #add-form { padding-bottom: 22px; }
.business-samples #today-view { padding: 24px; }
.business-samples #today-view h3 { margin-top: 28px; }
.business-samples #today-view h3:first-child { margin-top: 0; }
.business-samples #today-view > p { padding: 14px 0; line-height: 1.65; border-bottom: 1px solid #edf0f1; }
.business-samples #today-view > p .secondary { margin-left: 12px; padding: 6px 12px; }
.business-samples #pipeline-view { padding: 22px; }
.business-samples .field-heading { align-items: center; margin: 0 0 22px; }
.business-samples .field-heading h2 { display: none; }
.business-samples .field-heading p { max-width: 600px; line-height: 1.6; }
.business-samples .field-metrics { margin: 0 0 22px; border: 1px solid #d8e1e2; border-radius: 12px; background: #fff; overflow: hidden; }
.business-samples .field-metric { border: 0; border-right: 1px solid #e2e9e9; border-radius: 0; padding: 20px; box-shadow: none; }
.business-samples .property-grid { grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 20px; margin-top: 20px; }
.business-samples .property-card { border-radius: 14px; padding: 22px; box-shadow: 0 2px 5px #183d4210; }
.business-samples .property-card h3 { font-size: 19px; line-height: 1.4; margin: 6px 0 10px; }
.business-samples .property-card > p { line-height: 1.65; margin-bottom: 10px; }
.business-samples .property-card .parcel-outline { height: 158px; width: 100%; margin: -2px 0 16px; background: #f2f7f5; border-radius: 8px; border: 1px solid #d9e6e2; }
.business-samples .property-people { border-top: 1px solid #e1e8e7; padding-top: 15px; margin: 12px 0 18px; display: grid; gap: 10px; }
.business-samples .property-person { display: flex; gap: 9px; align-items: center; font-size: 13px; color: #425a60; line-height: 1.5; }
.business-samples .property-person img { border-radius: 50%; object-fit: cover; flex: none; }
.business-samples .relationship-photo { border-radius: 50%; object-fit: cover; flex: none; }
.business-samples .property-card > button { min-height: 40px; }
.business-samples .contact-identity-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.business-samples .contact-identity-heading .contact-avatar { flex: none; }
.business-samples .contact-avatar.has-portrait { width: 48px; height: 48px; overflow: hidden; }
.business-samples .contact-avatar.has-portrait img { width: 100%; height: 100%; object-fit: cover; }
.business-samples .contact-identity-heading h1 { min-width: 0; margin: 0; }
.business-samples #contact-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.business-samples .record-card { box-shadow: 0 2px 5px #183d4210; border-color: #d3dcdd; }
.business-samples main.record-open { padding: 24px; }
@media (max-width: 1000px) {
  .business-samples .topbar { flex-wrap: wrap; padding: 12px 18px; gap: 12px; }
  .business-samples .workspace-picker { max-width: none; }
  .business-samples main { padding: 20px; }
  .business-samples .sidebar { width: 180px; }
  .business-samples .title-row { align-items: start; }
  .business-samples .main-card > .card-heading { flex-wrap: wrap; padding: 18px; }
  .business-samples .main-card .search { width: 100%; }
}
@media (max-width: 700px) {
  .business-samples .topbar { gap: 10px; align-items: center; }
  .business-samples .product-brand { margin-right: auto; }
  .business-samples .workspace-picker { order: 3; flex: 1 0 100%; }
  .business-samples .auth-controls { margin-left: 0; }
  .business-samples .prototype-badge { padding: 5px 8px; font-size: 11px; }
  .business-samples .shell { display: flex; flex-direction: column; }
  .business-samples .sidebar { width: 100%; padding: 10px; }
  .business-samples .sidebar .nav-label,.business-samples .simple { display: none; }
  .business-samples .sidebar nav { display: flex; gap: 6px; overflow-x: auto; }
  .business-samples .sidebar nav button { flex: none; font-size: 13px; padding: 10px 12px; gap: 7px; }
  .business-samples .sidebar nav button img { width: 17px; height: 17px; }
  .business-samples main { padding: 18px 14px; }
  .business-samples .title-row { flex-wrap: wrap; gap: 14px; }
  .business-samples .title-row h1 { font-size: 25px; }
  .business-samples .title-row .section-help { font-size: 13px; }
  .business-samples .actions { flex-wrap: wrap; }
  .business-samples .table-wrap { overflow-x: auto; }
  .business-samples td { padding: 15px; }
  .business-samples .property-grid { grid-template-columns: minmax(0,1fr); }
  .business-samples .field-heading { flex-wrap: wrap; gap: 12px; }
  .business-samples main.record-open { padding: 14px; }
}

/* Tabs for a page made of several screens (pest workspace). Sits on its own line under the page title. */
.section-tabs { order: 3; flex: 1 0 100%; display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid #dbe5e8; scrollbar-width: none; }
.section-tabs[hidden] { display: none; }
.section-tabs button { flex: none; border: 0; background: none; padding: 8px 14px 10px; color: #4e636b; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: 0; white-space: nowrap; }
.section-tabs button:hover { color: #1a2328; }
.section-tabs button[aria-current="page"] { color: #28585c; border-bottom-color: #39636c; }
.section-tabs button:focus-visible { outline: 2px solid #39636c; outline-offset: -2px; }

/* Refresh: inside Strata the sample picker is one slim row, label beside the box,
   so the page content starts higher. */
.embedded-crm.business-samples .topbar, .business-samples .embedded-crm .topbar { min-height: 48px; padding: 6px 20px; gap: 12px; }
.embedded-crm.business-samples .workspace-picker, .business-samples .embedded-crm .workspace-picker { display: flex; align-items: center; gap: 10px; flex: 0 1 380px; font-size: 13px; white-space: nowrap; }
.embedded-crm.business-samples .workspace-picker select, .business-samples .embedded-crm .workspace-picker select { height: 34px; }
@media (max-width: 700px) {
  .embedded-crm.business-samples .topbar, .business-samples .embedded-crm .topbar { padding: 6px 12px; }
  .embedded-crm.business-samples .workspace-picker, .business-samples .embedded-crm .workspace-picker { flex: 1 1 100%; }
}
/* Follow-ups finished lately, with Reopen */
.completed-tasks { margin-top: 12px; }
.completed-tasks summary { cursor: pointer; font-weight: 600; }
.completed-tasks ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.completed-tasks li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* A customer's name breaks between words, never inside one ("Walkthr / ough"). */
.contact-identity-heading h1, #contact-title { overflow-wrap: break-word; word-break: normal; min-width: 0; flex: 1 1 auto; }

/* Homeowner record in the pest workspace (buyer review C03, C04): no photos by
   default, no empty company panel for a homeowner, one History list. */
body.pest-tenant .contact-avatar, body.pest-tenant .contact-row-photo { display: none; }
.pest-record.pest-record-no-company .record-associations .record-card:has(#contact-company-heading) { display: none; }
.pest-record #record-panel-activities > :not(.pest-history):not(.record-tools):not(#outlook-section) { display: none; }
.pest-record #contact-collapse-activities { display: none; }
.pest-history { display: grid; gap: 12px; }
.pest-history-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.pest-history-filters button { min-height: 36px; padding: 4px 14px; border: 1px solid #cddcdf; border-radius: 999px; background: #fff; color: #23474c; font: inherit; font-size: 14px; cursor: pointer; }
.pest-history-filters button[aria-pressed="true"] { background: #2f6468; border-color: #2f6468; color: #fff; }
.pest-history-list { list-style: none; margin: 0; padding: 0; }
.pest-history-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid #e4ecee; }
.pest-history-item time { color: #5b6f74; font-size: 14px; }
.pest-history-body strong { display: block; color: #263f4b; }
.pest-history-body p { margin: 2px 0 0; color: #50656f; font-size: 14px; overflow-wrap: anywhere; }
.pest-history-item a { font-size: 14px; font-weight: 600; white-space: nowrap; color: #2f6468; }
.pest-history-warning { padding: 10px 12px; border-radius: 10px; background: #fff7e6; color: #6b4a00; }
@media (max-width: 640px) {
  .pest-history-item { grid-template-columns: minmax(0, 1fr) auto; }
  .pest-history-item time { grid-column: 1 / -1; }
}
.pest-history > .record-card-heading { flex-wrap: wrap; }
.pest-history > .record-card-heading h2 { white-space: nowrap; margin-right: auto; }

/* Phone layout (buyer review U03): tables become a stack of cards on a narrow
   screen. web/app.js labels each cell with its column heading (data-label);
   the first cell is the record's name, buttons stay full size. Tables marked
   data-keep-table, or with fewer than three columns, are left as tables. */
@media (max-width: 640px) {
  table.phone-stack { display: block !important; width: 100% !important; min-width: 0 !important; max-width: 100% !important; overflow: visible !important; border: 0 !important; background: none !important; font-size: 15px; }
  table.phone-stack :is(thead, tbody, tfoot) { display: block; }
  table.phone-stack thead, table.phone-stack tr.phone-stack-head { display: none; }
  table.phone-stack tr { display: block; margin: 0 0 10px; padding: 10px 12px; border: 1px solid #d8e3e4; border-radius: 12px; background: #fff; }
  table.phone-stack tr[data-id] { cursor: pointer; }
  table.phone-stack :is(td, th) { display: grid; grid-template-columns: minmax(84px, 36%) minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 4px 0 !important; border: 0 !important; background: none; white-space: normal !important; overflow-wrap: anywhere; text-align: left !important; }
  table.phone-stack :is(td, th)::before { content: attr(data-label); color: #5b6f74; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
  table.phone-stack :is(td, th):first-child { display: block; padding-bottom: 6px !important; color: #263f4b; font-size: 16px; font-weight: 600; }
  table.phone-stack :is(td, th):first-child::before, table.phone-stack :is(td, th)[data-label=""]::before, table.phone-stack :is(td, th)[colspan]::before { content: none; }
  table.phone-stack :is(td, th):is([data-label=""], [colspan]) { display: block; }
  table.phone-stack :is(td, th):empty { display: none; }
  table.phone-stack td :is(button, a.button, select) { max-width: 100%; }
  /* Tab rows scroll sideways in one line; the fade says there is more. */
  .section-tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
}

/* Brand kit (SpecTech Strata, Nov 2026). Glass belongs to the Strata frame
   around the CRM; the CRM itself is a data surface on solid ground. Buttons
   use the shell's 17px corner and glass highlight. Scoped away from the pest
   control workspace (grouped menu), which keeps its own look for now. */
:root:not(:has(body.pest-menu)) body { background: #f4f6f7; }
:root:not(:has(body.pest-menu)) :is(.primary, .secondary) { border-radius: 17px; padding: 8px 16px; transition: box-shadow .15s ease, background-color .15s ease; }
:root:not(:has(body.pest-menu)) .primary { background: #2f6468; border-color: #2f6468; color: #fff; box-shadow: inset 0 1px 2px rgba(255, 255, 255, .65), 0 6px 18px rgba(47, 100, 104, .15); }
:root:not(:has(body.pest-menu)) .primary:hover { background: #28585c; border-color: #28585c; }
:root:not(:has(body.pest-menu)) .secondary { border-color: #d7dde0; background: #fff; color: #2f6468; box-shadow: inset 0 1px 2px rgba(255, 255, 255, .65), 0 1px 2px rgba(26, 35, 40, .06); }
:root:not(:has(body.pest-menu)) .secondary:hover { background: #e8f2f2; border-color: #b9d3d5; }
:root:not(:has(body.pest-menu)) .card { border-radius: 12px; border-color: #d7dde0; background: #fff; box-shadow: 0 1px 2px rgba(26, 35, 40, .06), 0 8px 24px rgba(26, 35, 40, .05); }
:root:not(:has(body.pest-menu)) :is(input, select, textarea) { border-radius: 8px; }

/* The pest standard on the other tools (homebuilder, real estate, land,
   relationships): body.standard-menu is set with their grouped menu. */
/* Deals board: one slim filter row, applied as you pick (no Apply button). */
body.standard-menu #pipeline-view:not([hidden]) { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
body.standard-menu #pipeline-view > label { display: grid; gap: 2px; flex: 0 1 220px; min-width: 150px; color: #5b6b73; font-size: 13px; font-weight: 600; }
body.standard-menu #pipeline-view > label :is(select, input) { width: 100%; min-height: 40px; box-sizing: border-box; }
body.standard-menu #pipeline-view > p.subtle, body.standard-menu #apply-pipeline-filters { display: none; }
body.standard-menu #pipeline-board, body.standard-menu #pipeline-unmapped { flex: 1 0 100%; min-width: 0; }
/* One main button per page: the extra tools sit behind a quiet "More". */
body.standard-menu .workspace-tools > summary { border-color: transparent; background: transparent; color: #2f6468; font-weight: 600; box-shadow: none; }
body.standard-menu .workspace-tools > summary::after { content: " ▾"; font-size: 12px; }
body.standard-menu .workspace-tools[open] > summary { background: #e8f2f2; border-color: transparent; }
/* Today: linked counts first. */
.today-tiles { margin: 4px 0 20px; }
.today-tiles .link-button { justify-self: start; margin-top: 4px; padding: 0; border: 0; background: none; color: #2f6468; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.today-tiles .link-button:hover { color: #1b365d; }
/* Task detail (pest Tasks): open a follow-up from its row. */
tr.task-row-open { cursor: pointer; }
.task-detail-form { display: grid; gap: 12px; }
.task-detail-form label { display: grid; gap: 4px; font-weight: 600; }
.task-detail-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; }
.task-detail-facts dt { color: #5b6d73; }
.task-detail-facts dd { margin: 0; }
.task-detail-form .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.task-detail-status:empty { display: none; }

/* ---------- Today dashboard (web/crm-dashboard.js) ----------
   KPI tiles, the pipeline by stage, weekly activity and win rate. Uses only
   this stylesheet, so it looks the same with or without the pest modules. */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 4px 0 18px; }
.dash-kpi { position: relative; display: grid; align-content: start; gap: 2px; padding: 16px 18px 14px; border: 1px solid #dfe8e7; border-radius: 16px; background: linear-gradient(180deg, #ffffff 0%, #f6faf9 100%); box-shadow: 0 10px 26px rgba(26, 63, 92, 0.06); }
.dash-kpi::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: #2f6468; opacity: 0.35; }
.dash-kpi-bad::before { background: #b3261e; opacity: 1; }
.dash-kpi-warn::before { background: #c27a12; opacity: 1; }
.dash-kpi-ok::before { background: #2e7d4f; opacity: 0.8; }
.dash-kpi-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 8px; border-radius: 10px; background: #e8f2f2; }
.dash-kpi-icon img { width: 18px; height: 18px; }
.dash-kpi-value { margin: 0; font-family: Montserrat, system-ui, sans-serif; font-size: 30px; font-weight: 700; line-height: 1.1; color: #1b365d; font-variant-numeric: tabular-nums; }
.dash-kpi-bad .dash-kpi-value { color: #b3261e; }
.dash-kpi-label { margin: 0; color: #51636e; font-size: 14px; }
.dash-link { justify-self: start; margin-top: 8px; padding: 0; border: 0; background: none; color: #2f6468; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.dash-link::after { content: " →"; }
.dash-link:hover { color: #1b365d; }

.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.dash-card { padding: 16px 18px; border: 1px solid #dfe8e7; border-radius: 16px; background: #fff; box-shadow: 0 10px 26px rgba(26, 63, 92, 0.05); }
.dash-card-wide { grid-column: 1 / -1; }
.dash-card-head { margin-bottom: 12px; }
#today-view .dash-card-head h3 { margin: 0; font-family: Montserrat, system-ui, sans-serif; font-size: 16px; color: #1b365d; }
.dash-card-head .subtle { margin: 2px 0 0; font-size: 13px; }

.dash-pipeline { display: grid; gap: 6px; }
.dash-bar-row { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) minmax(90px, auto); align-items: center; gap: 12px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; color: #1a2328; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.dash-bar-row:hover, .dash-bar-row:focus-visible { background: #f1f7f6; }
.dash-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-bar-track { display: block; height: 12px; border-radius: 6px; background: #eef3f2; overflow: hidden; }
.dash-bar-svg { display: block; width: 100%; height: 100%; }
.dash-bar-value { color: #51636e; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.dash-activity-svg { display: block; width: 100%; height: auto; max-height: 200px; }
.dash-activity-count { font-size: 9px; font-weight: 700; fill: #1b365d; }
.dash-activity-week { font-size: 9px; fill: #6a7b84; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 0 0; padding: 0; list-style: none; color: #51636e; font-size: 13px; }
.dash-legend li { display: inline-flex; align-items: center; gap: 4px; }

.dash-ring { display: flex; align-items: center; gap: 22px; }
.dash-ring-svg { width: 132px; height: 132px; flex: none; transform: rotate(0deg); }
.dash-ring-value { font-family: Montserrat, system-ui, sans-serif; font-size: 8px; font-weight: 700; fill: #1b365d; }
.dash-ring-facts { display: grid; gap: 8px; margin: 0; font-size: 14px; }
.dash-ring-facts div { display: grid; grid-template-columns: 54px 1fr; gap: 8px; }
.dash-ring-facts dt { color: #51636e; }
.dash-ring-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.dash-tasks { display: grid; gap: 0; margin: 0 0 8px; padding: 0; list-style: none; border: 1px solid #e3ebea; border-radius: 14px; background: #fff; overflow: hidden; }
.dash-tasks li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid #edf2f1; font-size: 14px; }
.dash-tasks li:first-child { border-top: 0; }
.dash-tasks li:hover { background: #f7fbfa; }
.dash-task-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-task-due { color: #51636e; font-size: 13px; font-variant-numeric: tabular-nums; }
.dash-tasks .secondary { padding: 5px 12px; }
.dash-chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.dash-chip-bad { background: #fbebeb; color: #a3271f; }
.dash-chip-warn { background: #fbf1df; color: #8a5d1a; }

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-bar-row { grid-template-columns: minmax(90px, 140px) minmax(0, 1fr); }
  .dash-bar-value { grid-column: 2; text-align: left; }
  .dash-tasks li { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dash-task-due { display: none; }
}

/* Opportunities board: column head with count and stage total, outcome edge, card lift. */
.pipeline-column { border-top: 3px solid #5f9ea0; box-shadow: 0 1px 2px rgba(27, 54, 93, 0.05); }
.pipeline-column-won { border-top-color: #2f7d4f; }
.pipeline-column-lost { border-top-color: #b4544a; }
.pipeline-column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pipeline-column-head h3 { margin: 0; font-size: 0.95rem; }
.pipeline-count { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: #e3eeee; color: #1b365d; font-size: 0.78rem; font-weight: 700; text-align: center; }
.pipeline-total { margin: 4px 0 0; font-weight: 600; }
.pipeline-card { box-shadow: 0 1px 3px rgba(27, 54, 93, 0.06); transition: box-shadow 0.15s ease, transform 0.15s ease; }
.pipeline-card:hover { box-shadow: 0 6px 16px rgba(27, 54, 93, 0.12); transform: translateY(-1px); }

/* One menu inside Strata (2026-11-20). When Strata frames the Cedarline
   (homebuilder) sample, Strata's Builder menu is the left menu, so the CRM's
   sidebar becomes a slim row of page tabs across the top instead of a second
   left menu. Every other sample keeps its own left sidebar (Aaron: the pest
   control CRM keeps its sidebar). Phones keep the "Menu" drawer. */
@media (min-width: 701px) {
  html.embedded-crm.crm-top-tabs .shell { flex-direction: column; }
  html.embedded-crm.crm-top-tabs .sidebar,
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu,
  html.embedded-crm.crm-top-tabs .business-samples .sidebar.grouped-menu,
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu.nav-collapsed {
    width: auto; max-height: none; padding: 6px 20px; overflow-x: auto; overflow-y: hidden;
    background: #ffffff; border-right: 0; border-bottom: 1px solid #dbe5e5; backdrop-filter: none;
  }
  html.embedded-crm.crm-top-tabs .sidebar .nav-head, html.embedded-crm.crm-top-tabs .sidebar .nav-label, html.embedded-crm.crm-top-tabs .sidebar .nav-collapse,
  html.embedded-crm.crm-top-tabs .sidebar .nav-group-label { display: none; }
  html.embedded-crm.crm-top-tabs .sidebar nav:not([hidden]),
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu nav:not([hidden]) { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; }
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu .nav-group { display: flex; gap: 2px; }
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu .nav-group + .nav-group { margin-left: 6px; padding-left: 8px; border-left: 1px solid #dbe5e5; border-top: 0; }
  html.embedded-crm.crm-top-tabs .sidebar nav button,
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu nav button,
  html.embedded-crm.crm-top-tabs .business-samples .sidebar.grouped-menu nav button {
    width: auto; min-height: 38px; padding: 8px 12px; gap: 8px; white-space: nowrap;
    border-radius: 8px; background: transparent; color: #3d535f; font-size: 0;
  }
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu nav button span,
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu.nav-collapsed nav button span { position: static; width: auto; height: auto; overflow: visible; clip: auto; font-size: 14px; }
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu nav button img { width: 18px; height: 18px; filter: none; opacity: .7; }
  html.embedded-crm.crm-top-tabs .sidebar nav button:hover,
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu nav button:hover { background: #edf4f4; }
  html.embedded-crm.crm-top-tabs .sidebar nav button[aria-current="page"],
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu nav button[aria-current="page"] { background: #e1eeee; color: #1b365d; font-weight: 600; box-shadow: inset 0 -2px 0 #2f6468; }
  html.embedded-crm.crm-top-tabs .sidebar.grouped-menu nav button[aria-current="page"] img { opacity: 1; }
}

/* Visit summary (pest workspace): what happened and what is next, before any form. */
.visit-summary-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 12px; }
.visit-summary-head h3 { margin: 0; }
.visit-summary-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #eef2f4; color: #34474f; }
.visit-summary-pill-confirmed, .visit-summary-pill-completed { background: #e4f3ea; color: #1d6b3a; }
.visit-summary-pill-unconfirmed { background: #fff4dc; color: #7a5500; }
.visit-summary-pill-late, .visit-summary-pill-cancelled { background: #fde8e6; color: #9b2c1f; }
.visit-summary-facts { margin-bottom: 12px; }
.visit-summary-facts .link-button { margin-left: 6px; }
.visit-summary-work { margin-top: 14px; padding: 12px 14px; border: 1px solid #dce6e8; border-radius: 10px; background: #f7fafa; }
.visit-summary-work h4 { margin: 0 0 8px; }
.visit-summary-messages { margin-top: 14px; }
.visit-summary-messages summary { cursor: pointer; font-weight: 600; }
.visit-summary-danger { margin-top: 18px; padding-top: 12px; border-top: 1px solid #e6ecee; }
.visit-cancel-confirm { margin-top: 10px; padding: 12px 14px; border: 1px solid #f1c0bb; border-radius: 10px; background: #fdf3f2; }
.visit-cancel-confirm p { margin: 0 0 8px; color: #6b1d15; }
.danger-button { color: #9b2c1f; border: 1px solid #e9b8b1; background: #fff; border-radius: 8px; padding: 8px 14px; font: inherit; cursor: pointer; }
.danger-button:hover { background: #fdf0ee; }

/* ---- Laptop width (about 1024 px): words never split mid-word ------------- */
/* Headings and table headers keep whole words; tables scroll sideways inside
   their card instead of squeezing every column to one word per line. */
.record-card-heading { flex-wrap: wrap; }
.record-card-heading h2 { overflow-wrap: normal; word-break: normal; hyphens: none; }
th { overflow-wrap: normal; word-break: normal; white-space: nowrap; }
td button, td a.secondary, td .text-button { white-space: nowrap; overflow-wrap: normal; }
main[data-screen="People"] #record-table td:nth-child(2) { max-width: 220px; overflow-wrap: anywhere; }
main[data-screen="People"] #record-table td { padding-left: 10px; padding-right: 10px; }
.relationship-panel:has(.pest-account-overview) { max-height: none; }
.pest-account-overview { margin-top: 12px; }
.pest-account-facts { display: grid; gap: 10px; margin: 0; }
.pest-account-facts dt { color: #5b6d74; font-size: 13px; font-weight: 600; }
.pest-account-facts dd { margin: 2px 0 0; white-space: pre-line; color: #23343b; }
main[data-screen="People"] #record-table td.cell-email { overflow-wrap: normal; word-break: normal; }

/* Commercial brokerage: the facts of a site, label beside value. */
.site-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0; }
.site-facts dt { color: var(--muted, #5b6470); }
.site-facts dd { margin: 0; }

/* Start-up: hide the static starting layout until the workspace has loaded. */
.app-loading-screen { display: none; }
html.app-loading .app-loading-screen { display: flex; flex: 1; align-items: center; justify-content: center; gap: 12px; min-height: 60vh; color: #51636e; font-size: 14px; }
html.app-loading .shell,
html.app-loading .workspace-picker,
html.app-loading .auth-controls { display: none !important; }
.app-loading-spinner { width: 20px; height: 20px; border: 2px solid #c9d4d9; border-top-color: #2f6468; border-radius: 50%; animation: app-loading-spin 0.8s linear infinite; }
@keyframes app-loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .app-loading-spinner { animation: none; } }

/* Builder embed mode (2026-11-21, web/builder-embed.js). Strata's Builder suite
   frames Cedarline with ?embed=builder and shows its own menu and page title,
   so the CRM shows no chrome of its own: no top bar, no sidebar (nor the phone
   "Menu" drawer), no page title. The page's own buttons and tabs stay. Only
   html.builder-embed is affected; every other sample and the framed
   homebuilder page without embed=builder (html.crm-top-tabs) are unchanged. */
html.builder-embed body { background: #f6f8f9 none; }
html.builder-embed .topbar,
html.builder-embed .sidebar { display: none !important; }
html.builder-embed .shell { display: flex; flex-direction: column; }
html.builder-embed main,
html.builder-embed.business-samples main,
html.builder-embed main.record-open,
html.builder-embed.business-samples main.record-open { flex: 1; width: 100%; max-width: none; padding: 20px; background: #f6f8f9; }
html.builder-embed .title-row > div:first-child { display: none; }
html.builder-embed .title-row { justify-content: flex-end; margin-bottom: 12px; }
html.builder-embed .title-row:has(> #section-tabs[hidden]):has(> .actions[hidden]) { display: none; }
@media (max-width: 700px) {
  html.builder-embed main,
  html.builder-embed.business-samples main,
  html.builder-embed main.record-open,
  html.builder-embed.business-samples main.record-open { padding: 14px; }
}
/* Builder embed mode: page purpose and "what needs you" strip, the Buyers
   pipeline, lead ratings, lead details and the Homes cards. Colors follow the
   pest CRM's chips (web/pest/workspace.css .pest-chip-*). */
html.builder-embed .embed-intro { display: grid; gap: 12px; margin: 0 0 16px; }
html.builder-embed .embed-purpose { margin: 0; color: #3c4a52; font-size: 15px; }
html.builder-embed .embed-needs { display: flex; flex-wrap: wrap; gap: 10px; }
html.builder-embed .embed-need { display: flex; align-items: baseline; gap: 8px; min-height: 44px; padding: 10px 14px; border: 1px solid #dbe3e5; border-radius: 10px; background: #fff; color: #1b365d; font: inherit; text-align: left; }
html.builder-embed button.embed-need { cursor: pointer; }
html.builder-embed button.embed-need:hover { border-color: #2f6468; box-shadow: 0 1px 4px rgba(27, 54, 93, .12); }
html.builder-embed .embed-need strong { font-family: Montserrat, system-ui, sans-serif; font-size: 20px; }
html.builder-embed .embed-need span { color: #4a5b63; font-size: 14px; }
html.builder-embed .embed-need-bad { border-left: 4px solid #a3271f; }
html.builder-embed .embed-need-warn { border-left: 4px solid #b07a1c; }
html.builder-embed .embed-need-good { border-left: 4px solid #1f5a3a; }
html.builder-embed .embed-need-info { border-left: 4px solid #2f6468; }
html.builder-embed .buyer-pipeline,
html.builder-embed .homes-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
html.builder-embed .buyer-stage-chips { display: flex; flex-wrap: wrap; gap: 6px; }
html.builder-embed .buyer-stage-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border: 1px solid #d3dddf; border-radius: 999px; background: #fff; color: #3c4a52; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
html.builder-embed .buyer-stage-chip[aria-pressed="true"] { border-color: #2f6468; background: #2f6468; color: #fff; }
html.builder-embed .buyer-stage-count { padding: 0 7px; border-radius: 999px; background: rgba(0, 0, 0, .07); font-size: 12px; }
html.builder-embed .buyer-pipeline-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: #4a5b63; }
html.builder-embed .buyer-pipeline-controls label { display: inline-flex; align-items: center; gap: 6px; }
html.builder-embed .lead-badge,
html.builder-embed .stage-pill,
html.builder-embed .home-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: #e9eef0; color: #3c4a52; }
html.builder-embed .lead-hot { background: #fbe4e4; color: #8a1f1f; }
html.builder-embed .lead-warm { background: #fbefd9; color: #7a4a08; }
html.builder-embed .lead-cool { background: #e4edf6; color: #1b365d; }
html.builder-embed .stage-hot,
html.builder-embed .stage-under-contract,
html.builder-embed .home-status-under-contract { background: #e3f3ea; color: #1f5a3a; }
html.builder-embed .stage-closed,
html.builder-embed .home-status-sold { background: #e9e6f3; color: #3f3470; }
html.builder-embed .stage-cooling-off,
html.builder-embed .home-status-coming-soon { background: #fbefd9; color: #7a4a08; }
html.builder-embed .stage-engaged,
html.builder-embed .stage-touring,
html.builder-embed .home-status-move-in-ready { background: #e8f2f2; color: #2f6468; }
html.builder-embed .home-status-under-construction { background: #eef0f2; color: #3c4a52; }
html.builder-embed .home-status-model-home { background: #1b365d; color: #fff; }
html.builder-embed .contact-row-initials { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #dbe8e8; color: #234e52; font-weight: 700; font-size: 14px; }
html.builder-embed #records tr[data-id] { transition: background .12s; }
html.builder-embed #records tr[data-id]:hover { background: #f2f8f8; cursor: pointer; }
html.builder-embed .lead-score-head { display: flex; align-items: center; gap: 10px; }
html.builder-embed .lead-score-number { font-family: Montserrat, system-ui, sans-serif; font-size: 34px; color: #1b365d; }
html.builder-embed .lead-meter { position: relative; height: 8px; margin: 10px 0 4px; border-radius: 999px; background: #e9eef0; overflow: hidden; }
html.builder-embed .lead-meter::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--lead-score); border-radius: 999px; background: #2f6468; }
html.builder-embed .lead-meter.lead-hot::after { background: #a3271f; }
html.builder-embed .lead-meter.lead-warm::after { background: #b07a1c; }
html.builder-embed .buyer-lead h3 { margin: 12px 0 6px; font-size: 14px; }
html.builder-embed .lead-why,
html.builder-embed .lead-timeline,
html.builder-embed .home-buyers,
html.builder-embed .home-showings { margin: 0; padding: 0; list-style: none; }
html.builder-embed .lead-why li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid #edf2f1; font-size: 14px; }
html.builder-embed .lead-points { font-variant-numeric: tabular-nums; font-weight: 700; }
html.builder-embed .lead-plus .lead-points { color: #1f5a3a; }
html.builder-embed .lead-minus .lead-points { color: #a3271f; }
html.builder-embed .lead-zero { color: #6a7a82; }
html.builder-embed .lead-sample-note { margin: 0 0 8px; padding: 6px 10px; border-radius: 6px; background: #fbefd9; color: #7a4a08; font-size: 13px; font-weight: 600; }
html.builder-embed .lead-timeline li.lead-event { display: grid; gap: 2px; padding: 8px 0 8px 14px; border-left: 2px solid #d3dddf; font-size: 14px; }
html.builder-embed .lead-event-date { color: #51636e; font-size: 12px; }
html.builder-embed .lead-answers { margin: 4px 0 0; padding-left: 16px; color: #3c4a52; font-size: 13px; }
html.builder-embed .homes-layout { display: inline-flex; gap: 4px; }
html.builder-embed .homes-layout button[aria-pressed="true"] { background: #2f6468; color: #fff; }
html.builder-embed .homes-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
html.builder-embed .homes-body:has(> .home-panel:not([hidden])) { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); }
html.builder-embed .home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
html.builder-embed .home-card { display: grid; padding: 0; overflow: hidden; border: 1px solid #dbe3e5; border-radius: 12px; background: #fff; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s, transform .15s; }
html.builder-embed .home-card:hover,
html.builder-embed .home-card[aria-current] { box-shadow: 0 4px 14px rgba(27, 54, 93, .14); transform: translateY(-1px); border-color: #2f6468; }
html.builder-embed .home-photo { position: relative; aspect-ratio: 8 / 5; background: #e9eef0; }
html.builder-embed .home-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
html.builder-embed .home-photo-tag { position: absolute; left: 8px; bottom: 8px; padding: 1px 8px; border-radius: 999px; background: rgba(27, 54, 93, .78); color: #fff; font-size: 11px; font-weight: 600; }
html.builder-embed .home-card-copy { display: grid; gap: 3px; padding: 12px 14px 14px; font-size: 14px; }
html.builder-embed .home-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
html.builder-embed .home-card-price { font-family: Montserrat, system-ui, sans-serif; font-size: 18px; color: #1b365d; }
html.builder-embed .home-card-address { font-weight: 600; }
html.builder-embed .home-panel { position: sticky; top: 12px; display: grid; gap: 10px; padding: 14px; border: 1px solid #dbe3e5; border-radius: 12px; background: #fff; }
html.builder-embed .home-panel-close { justify-self: end; }
html.builder-embed .home-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
html.builder-embed .home-panel-head h2 { margin: 0; font-size: 18px; }
html.builder-embed .home-panel-price { margin: 0; color: #3c4a52; font-weight: 600; }
html.builder-embed .home-thumbs { display: flex; gap: 6px; overflow-x: auto; }
html.builder-embed .home-thumb { flex: none; width: 72px; height: 45px; padding: 0; border: 1px solid #dbe3e5; border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; }
html.builder-embed .home-thumb img { width: 100%; height: 100%; object-fit: cover; }
html.builder-embed .home-buyers li,
html.builder-embed .home-showings li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid #edf2f1; font-size: 14px; }
html.builder-embed .homes-table { width: 100%; border-collapse: collapse; background: #fff; }
html.builder-embed .homes-table th,
html.builder-embed .homes-table td { padding: 10px 12px; border-bottom: 1px solid #edf2f1; text-align: left; font-size: 14px; }
html.builder-embed .homes-table tr:hover { background: #f2f8f8; cursor: pointer; }
@media (max-width: 900px) {
  html.builder-embed .homes-body:has(> .home-panel:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  html.builder-embed .home-panel { position: static; }
}
/* Builder embed mode, a buyer's record: builder words only. The lead details
   replace Intelligence; revenue drafts, tickets, companies and linking deals by
   hand are not part of the Builder suite. */
html.builder-embed #record-tab-revenue,
html.builder-embed #record-tab-intelligence,
html.builder-embed .record-card:has(> .record-card-heading > #contact-ticket-heading),
html.builder-embed .record-card:has(> .record-card-heading > #contact-company-heading),
html.builder-embed .record-card:has(> .record-card-heading > #contact-deal-heading) > .record-disclosure,
html.builder-embed #contact-update label:has(> select[name="companyId"]) { display: none !important; }
html.builder-embed .buyer-home-line { display: block; }
/* Builder embed mode: lead routing and buyer texts. */
html.builder-embed .assignee-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #1b365d; color: #fff; font-size: 12px; font-weight: 700; vertical-align: middle; }
html.builder-embed .assignee-badge.assignee-none { background: #e9eef0; color: #6a7a82; }
html.builder-embed .assignee-name { color: #3c4a52; font-size: 14px; }
html.builder-embed .unread-badge { display: inline-block; margin: 2px 0; padding: 1px 8px; border-radius: 999px; background: #a3271f; color: #fff; font-size: 12px; font-weight: 700; }
html.builder-embed .buyer-assignment { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: #f4f8f8; }
html.builder-embed .buyer-assignment select { margin-left: auto; }
html.builder-embed .routing-dialog { width: min(520px, calc(100vw - 32px)); border: 1px solid #dbe3e5; border-radius: 12px; padding: 18px; }
html.builder-embed .routing-form { display: grid; gap: 12px; }
html.builder-embed .routing-rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #edf2f1; }
html.builder-embed .routing-rule > span { display: grid; gap: 2px; }
html.builder-embed .text-thread { display: grid; gap: 8px; max-height: 360px; margin: 0 0 10px; padding: 4px; overflow-y: auto; list-style: none; }
html.builder-embed .text-bubble { display: grid; gap: 3px; max-width: 78%; padding: 8px 12px; border-radius: 14px; font-size: 14px; }
html.builder-embed .text-in { justify-self: start; background: #eef2f4; color: #1f2d33; border-bottom-left-radius: 4px; }
html.builder-embed .text-out { justify-self: end; background: #2f6468; color: #fff; border-bottom-right-radius: 4px; }
html.builder-embed .text-meta { display: flex; gap: 8px; font-size: 11px; opacity: .85; }
html.builder-embed .text-sample-tag { padding: 0 6px; border-radius: 999px; background: #fbefd9; color: #7a4a08; font-weight: 700; }
html.builder-embed .text-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
html.builder-embed .text-quick-button { min-height: 32px; padding: 4px 10px; font-size: 13px; }
html.builder-embed .text-send { display: flex; gap: 8px; align-items: flex-end; }
html.builder-embed .text-send textarea { flex: 1; resize: vertical; }

