:root {
  --property-panel: #ffffff;
  --property-soft: #f8fafc;
  --property-line: #d9e3ec;
  --property-navy: #0d2c54;
  --property-muted: #5d6b7c;
  --property-teal: #1f7a6d;
  --property-blue: #4ba3ff;
}

.properties-shell {
  box-sizing: border-box;
  margin: 30px auto;
  max-width: 1280px;
  padding: 0 20px 30px;
}

.properties-header,
.properties-toolbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.properties-header {
  margin: 22px 0 14px;
}

.properties-header .eyebrow,
.coordinate-repair-heading .eyebrow {
  color: var(--property-teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.property-count-card {
  background: var(--property-panel);
  border: 1px solid var(--property-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(13, 44, 84, 0.08);
  min-width: 120px;
  padding: 12px 16px;
  text-align: right;
}

.property-count-card span {
  color: var(--property-muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.property-count-card strong {
  color: var(--property-navy);
  display: block;
  font-size: 1.55rem;
}

.properties-toolbar {
  margin-bottom: 16px;
}

.properties-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  margin: 0 0 16px;
}

.property-metric {
  background: var(--property-panel);
  border: 1px solid var(--property-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(13, 44, 84, 0.08);
  padding: 12px 14px;
}

.property-metric span,
.property-search span {
  color: var(--property-muted);
  display: block;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.property-metric strong {
  color: var(--property-navy);
  display: block;
  font-size: 1.45rem;
}

.properties-status {
  background: var(--property-soft);
  border: 1px solid var(--property-line);
  border-radius: 999px;
  color: var(--property-muted);
  font-weight: 700;
  padding: 8px 12px;
}

.property-search {
  align-items: center;
  display: grid;
  gap: 4px;
  min-width: min(320px, 100%);
}

.property-search input {
  border: 1px solid var(--property-line);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--property-navy);
  font-size: 0.95rem;
  min-height: 42px;
  padding: 9px 12px;
  width: 100%;
}

.property-action-summary {
  background: var(--property-panel);
  border: 1px solid var(--property-line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(13, 44, 84, 0.08);
  margin-bottom: 16px;
  padding: 16px;
}

.property-action-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.property-action-heading h2 {
  color: var(--property-navy);
  font-size: 1.08rem;
  margin: 0;
}

.property-action-heading > span {
  background: var(--property-soft);
  border: 1px solid var(--property-line);
  border-radius: 999px;
  color: var(--property-muted);
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 850;
  padding: 6px 10px;
}

.property-action-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.property-action-card {
  background: var(--property-soft);
  border: 1px solid var(--property-line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.property-action-card.is-active {
  border-color: rgba(47, 199, 161, 0.62);
  box-shadow: inset 0 0 0 1px rgba(47, 199, 161, 0.18);
}

.property-action-card.has-work:not(.is-active) {
  border-color: rgba(244, 201, 93, 0.36);
}

.property-action-card-heading {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.property-action-card-heading span,
.property-action-meta {
  color: var(--property-muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.property-action-card-heading strong {
  color: var(--property-navy);
  font-size: 1.42rem;
  line-height: 1;
}

.property-action-card p {
  color: var(--property-navy);
  font-size: 0.84rem;
  line-height: 1.35;
  margin: 0;
}

.property-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.property-action-filter,
.property-action-link,
.property-list-actions a {
  align-items: center;
  border: 1px solid var(--property-line);
  border-radius: 8px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 850;
  justify-content: center;
  min-height: 32px;
  padding: 6px 9px;
  text-decoration: none;
}

.property-action-filter {
  background: var(--property-navy);
  color: #ffffff;
}

.property-action-link,
.property-list-actions a {
  background: var(--property-panel);
  color: var(--property-navy);
}

.property-action-filter:hover,
.property-action-filter:focus-visible,
.property-action-link:hover,
.property-action-link:focus-visible,
.property-list-actions a:hover,
.property-list-actions a:focus-visible {
  border-color: rgba(75, 163, 255, 0.7);
  outline: none;
}

.coordinate-repair-card {
  background: var(--property-panel);
  border: 1px solid var(--property-line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(13, 44, 84, 0.08);
  margin-bottom: 16px;
  padding: 16px;
}

.coordinate-repair-card.is-hidden {
  display: none;
}

.coordinate-repair-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.coordinate-repair-heading h2 {
  color: var(--property-navy);
  font-size: 1.08rem;
  margin: 0;
}

.coordinate-repair-heading > span {
  background: rgba(244, 201, 93, 0.13);
  border: 1px solid rgba(244, 201, 93, 0.34);
  border-radius: 999px;
  color: #8a6200;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 850;
  padding: 6px 10px;
}

.coordinate-repair-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1.35fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) auto;
}

.coordinate-repair-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.coordinate-repair-form label span {
  color: var(--property-muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.coordinate-repair-form input {
  background: #fff;
  border: 1px solid var(--property-line);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--property-navy);
  min-height: 42px;
  padding: 0 11px;
  width: 100%;
}

.coordinate-repair-form input:focus {
  border-color: rgba(75, 163, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(75, 163, 255, 0.16);
  outline: none;
}

.coordinate-repair-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.secondary-button {
  background: var(--property-soft);
  border: 1px solid var(--property-line);
  border-radius: 8px;
  color: var(--property-navy);
  cursor: pointer;
  font-weight: 850;
  min-height: 42px;
  padding: 0 12px;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: rgba(75, 163, 255, 0.68);
  outline: none;
}

.coordinate-repair-status {
  color: var(--property-muted);
  font-size: 0.86rem;
  font-weight: 750;
  margin-top: 10px;
  min-height: 1.2em;
}

.coordinate-repair-status[data-tone="success"] {
  color: var(--property-teal);
}

.coordinate-repair-status[data-tone="warning"] {
  color: #9d7200;
}

.coordinate-repair-status[data-tone="danger"] {
  color: #b3261e;
}

.properties-layout {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

#map-container {
    width: 100%;
    min-height: 620px;
    padding: 16px;
    box-sizing: border-box;
    border: 1px solid var(--property-line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 10px 28px rgba(13, 44, 84, 0.08);
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#map {
    width: 100% !important;
    height: 100% !important;
    min-height: 580px;
    z-index: 0;
    position: relative;
    border-radius: 8px;
}

html {
  background: #071421;
}

body[data-page-id="properties"] {
  background: linear-gradient(180deg, #071421 0%, #0a1826 44%, #0d1721 100%);
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

h1 {
    text-align: left;
    padding: 0;
    color: var(--property-navy);
    font-size: 2.15rem;
    margin: 0;
}

.add-property-container {
    text-align: center;
    margin-top: 10px;
}

.add-property-container.is-hidden {
    display: none;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0d2c54;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #1b3f73;
}

.property-list-panel {
  background: var(--property-panel);
  border: 1px solid var(--property-line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(13, 44, 84, 0.08);
  box-sizing: border-box;
  min-height: 620px;
  padding: 16px;
}

.property-list-panel h2 {
  color: var(--property-navy);
  font-size: 1rem;
  margin: 0 0 12px;
}

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

.property-list-item {
  border: 1px solid var(--property-line);
  border-radius: 8px;
  color: var(--property-navy);
  display: block;
  font-weight: 750;
  padding: 10px 12px;
  text-decoration: none;
}

.property-list-title {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.property-list-title strong {
  overflow-wrap: anywhere;
}

.property-title-link {
  color: var(--property-navy);
  font-weight: 850;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.property-title-link:hover,
.property-title-link:focus-visible {
  color: var(--property-blue);
  outline: none;
}

.property-health-badge {
  border: 1px solid var(--property-line);
  border-radius: 999px;
  color: var(--property-muted);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.property-health-badge.is-good {
  background: rgba(31, 122, 109, 0.12);
  border-color: rgba(31, 122, 109, 0.32);
  color: #1f7a6d;
}

.property-health-badge.is-warning,
.property-health-badge.is-neutral {
  background: rgba(213, 155, 45, 0.12);
  border-color: rgba(213, 155, 45, 0.34);
  color: #9a6510;
}

.property-health-badge.is-danger {
  background: rgba(185, 74, 72, 0.12);
  border-color: rgba(185, 74, 72, 0.32);
  color: #9c2b22;
}

.property-list-item:hover,
.property-list-item:focus-visible {
  background: #eef6f8;
  outline: none;
}

.property-list-meta {
  color: var(--property-muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  margin-top: 4px;
}

.property-operating-profile {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  margin-top: 10px;
}

.property-profile-stat {
  background: var(--property-soft);
  border: 1px solid var(--property-line);
  border-radius: 8px;
  min-width: 0;
  padding: 8px;
}

.property-profile-stat small {
  color: var(--property-muted);
  display: block;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.property-profile-stat strong {
  color: var(--property-navy);
  display: block;
  font-size: 0.9rem;
  line-height: 1.25;
  margin-top: 3px;
  overflow-wrap: anywhere;
}

.property-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

body[data-dashboard-theme="executive-navy"] {
  --property-panel: #0f2437;
  --property-soft: rgba(255, 255, 255, 0.06);
  --property-line: rgba(172, 196, 219, 0.22);
  --property-navy: #f7fbff;
  --property-muted: #9fb2c8;
  --property-teal: #2fc7a1;
  background: linear-gradient(180deg, #071421 0%, #0a1826 44%, #0d1721 100%);
  color: var(--property-navy);
}

body[data-dashboard-theme="executive-navy"] .properties-shell {
  color: var(--property-navy);
}

body[data-dashboard-theme="executive-navy"] #map-container,
body[data-dashboard-theme="executive-navy"] .property-list-panel,
body[data-dashboard-theme="executive-navy"] .property-count-card,
body[data-dashboard-theme="executive-navy"] .property-metric,
body[data-dashboard-theme="executive-navy"] .property-action-summary,
body[data-dashboard-theme="executive-navy"] .coordinate-repair-card {
  background: linear-gradient(180deg, rgba(19, 45, 67, 0.95), rgba(13, 31, 48, 0.96));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

body[data-dashboard-theme="executive-navy"] .properties-status,
body[data-dashboard-theme="executive-navy"] .property-action-card,
body[data-dashboard-theme="executive-navy"] .property-list-item {
  background: rgba(255, 255, 255, 0.06);
}

body[data-dashboard-theme="executive-navy"] .property-health-badge.is-good {
  background: rgba(47, 199, 161, 0.14);
  border-color: rgba(47, 199, 161, 0.36);
  color: #8cf2dc;
}

body[data-dashboard-theme="executive-navy"] .property-health-badge.is-warning,
body[data-dashboard-theme="executive-navy"] .property-health-badge.is-neutral {
  background: rgba(244, 201, 93, 0.14);
  border-color: rgba(244, 201, 93, 0.36);
  color: #ffe7a3;
}

body[data-dashboard-theme="executive-navy"] .property-health-badge.is-danger {
  background: rgba(255, 122, 110, 0.14);
  border-color: rgba(255, 122, 110, 0.36);
  color: #ffb7ae;
}

body[data-dashboard-theme="executive-navy"] .property-search input {
  background: rgba(5, 14, 24, 0.82);
  border-color: var(--property-line);
  color: var(--property-navy);
}

body[data-dashboard-theme="executive-navy"] .property-search input::placeholder {
  color: #7d91a8;
}

body[data-dashboard-theme="executive-navy"] .property-search input:focus {
  border-color: rgba(75, 163, 255, 0.85);
  box-shadow: 0 0 0 3px rgba(75, 163, 255, 0.2);
  outline: none;
}

body[data-dashboard-theme="executive-navy"] .coordinate-repair-heading > span {
  color: #ffe7a3;
}

body[data-dashboard-theme="executive-navy"] .coordinate-repair-form input {
  background: rgba(5, 14, 24, 0.82);
  border-color: var(--property-line);
  caret-color: #f7fbff;
  color: var(--property-navy);
}

body[data-dashboard-theme="executive-navy"] .coordinate-repair-form input::placeholder {
  color: #7d91a8;
}

body[data-dashboard-theme="executive-navy"] .secondary-button {
  background: rgba(255, 255, 255, 0.07);
  color: var(--property-navy);
}

body[data-dashboard-theme="executive-navy"] .property-action-filter {
  background: #2fc7a1;
  border-color: rgba(47, 199, 161, 0.58);
  color: #061622;
}

body[data-dashboard-theme="executive-navy"] .property-action-link,
body[data-dashboard-theme="executive-navy"] .property-list-actions a {
  background: rgba(255, 255, 255, 0.07);
  color: var(--property-navy);
}

.properties-core-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.properties-map-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.properties-view-tabs {
  align-items: center;
  background: rgba(9, 22, 36, 0.78);
  border: 1px solid var(--property-line);
  border-radius: 6px;
  display: flex;
  gap: 4px;
  margin: 2px 0 14px;
  overflow-x: auto;
  padding: 5px;
}

.properties-view-tabs button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--property-muted);
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  min-height: 38px;
  padding: 8px 15px;
}

.properties-view-tabs button:hover,
.properties-view-tabs button:focus-visible {
  background: rgba(75, 163, 255, 0.16);
  color: var(--property-navy);
}

.properties-view-tabs button[aria-selected="true"] {
  background: #11476f;
  border-color: #2fc7a1;
  box-shadow: inset 0 -3px 0 #f4c95d;
  color: #ffffff;
}

.property-workspace-view[hidden],
[data-property-view][hidden] {
  display: none !important;
}

.property-view-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 0 14px;
}

.property-view-heading .eyebrow {
  color: var(--property-teal);
  font-size: 0.76rem;
  font-weight: 850;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.property-view-heading h2 {
  color: var(--property-navy);
  font-size: 1.25rem;
  margin: 0;
}

.property-view-heading > span {
  color: var(--property-muted);
  font-size: 0.84rem;
  max-width: 500px;
  text-align: right;
}

.property-list-panel {
  min-height: 0;
}

.property-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#propertiesMapView {
  background: linear-gradient(180deg, rgba(19, 45, 67, 0.72), rgba(13, 31, 48, 0.76));
  border: 1px solid var(--property-line);
  border-radius: 8px;
  padding: 16px;
}

#propertiesMapView #map-container {
  min-height: 520px;
  padding: 8px;
}

#propertiesMapView #map {
  min-height: 500px;
}

body[data-dashboard-theme="executive-navy"] .property-action-heading > span {
  color: var(--property-navy);
}

body[data-dashboard-theme="executive-navy"] .coordinate-repair-status[data-tone="warning"] {
  color: #ffe7a3;
}

body[data-dashboard-theme="executive-navy"] .coordinate-repair-status[data-tone="danger"] {
  color: #ffb7ae;
}

.map-state {
  color: var(--property-muted);
  font-weight: 750;
  padding: 16px;
  text-align: center;
}

.map-info-window {
  color: #0d2c54;
  display: grid;
  gap: 6px;
  min-width: 150px;
}

.map-info-window strong {
  color: #0d2c54;
}

.map-info-window span {
  color: #4b5f77;
  font-size: 0.8rem;
  font-weight: 650;
}

.map-info-window a {
  color: #17699e;
  font-weight: 750;
  text-decoration: none;
}

@media (max-width: 900px) {
  .properties-header,
  .properties-toolbar,
  .property-action-heading,
  .coordinate-repair-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .coordinate-repair-form {
    grid-template-columns: 1fr 1fr;
  }

  .coordinate-repair-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .property-count-card {
    text-align: left;
  }

  .properties-layout {
    grid-template-columns: 1fr;
  }

  .properties-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-list {
    grid-template-columns: 1fr;
  }

  .property-view-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .property-view-heading > span {
    text-align: left;
  }

  .property-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #map-container,
  .property-list-panel {
    min-height: auto;
  }

  #map {
    min-height: 420px;
  }

  .property-list-title {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .properties-metrics,
  .property-action-grid,
  .property-operating-profile,
  .coordinate-repair-form {
    grid-template-columns: 1fr;
  }

  .coordinate-repair-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
