:root {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  color: #1a2328;
  background: #aabac0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(78, 103, 112, 0.38), rgba(95, 116, 123, 0.38)),
    url("/strata-curves-light-v3.webp") center 45% / 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: #64748b;
  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: #94a3b8;
  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: #64748b;
  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: #40868b;
  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 #40868b;
  background: #40868b;
  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: #94a3b8;
  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;
  background-image: radial-gradient(#edf4f4 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  color: #64748b;
  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: #64748b;
  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: #64748b;
}
.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: #64748b;
}
.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: #64748b;
  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-page {
  max-width: 600px;
  margin: 8vh auto;
  padding: 2rem;
}
.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;
  }
}
