:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --ink: #0c1116;
  --muted: #697586;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --green: #12a87d;
  --green-soft: #e4f8f1;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --amber: #c98212;
  --amber-soft: #fff3d9;
  --coral: #dc5a44;
  --coral-soft: #ffebe8;
  --violet: #6f5bd7;
  --violet-soft: #eeeaff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #07130f;
  background: #b9ff66;
  border-radius: 8px;
  font-weight: 900;
}

.brand strong,
.brand span,
.header-date strong,
.header-date span {
  display: block;
}

.brand strong {
  font-size: 15px;
}

.brand span,
.header-date span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.header-date {
  min-width: 130px;
  text-align: right;
}

.header-date strong {
  margin-top: 2px;
  font-size: 14px;
}

.nav-list {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.nav-item {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: #536170;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 780;
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--ink);
  background: #f1f5f9;
  border-color: var(--line);
}

.workspace {
  max-width: 1600px;
  margin: 0 auto;
  padding: 22px 24px 36px;
}

.app-view {
  display: none;
}

.app-view.is-active {
  display: block;
}

.module-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.module-head h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.02;
  font-weight: 880;
}

.command-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.command-bar h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.02;
  font-weight: 880;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-actions,
.filter-row {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box,
.filter-row label,
.ipc-grid label,
.property-form label,
.office-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-box {
  min-width: min(340px, 100%);
}

input,
select,
textarea {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  width: calc(100% - 32px);
  min-height: 145px;
  margin: 0 16px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 168, 125, 0.14);
}

.field-hidden {
  display: none !important;
}

.segmented {
  display: flex;
  min-height: 42px;
  padding: 3px;
  background: #edf2f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segment {
  min-width: 68px;
  padding: 0 12px;
  color: #536170;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 850;
  white-space: nowrap;
}

.segment.is-active {
  color: #ffffff;
  background: #0c1116;
}

.map-mode .segment {
  min-width: 130px;
}

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

.metric-card,
.panel,
.office-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card,
.office-card {
  position: relative;
  min-height: 106px;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-color: #dde5ef;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.metric-card::before,
.office-card::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 999px;
}

.metric-card strong,
.office-card strong {
  display: block;
  margin: 10px 0 5px;
  max-width: calc(100% - 18px);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.metric-card span,
.office-card span {
  display: block;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.metric-card small,
.office-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.metric-card.blue,
.office-card.blue {
  border-color: #d9e4f8;
}

.metric-card.blue::before,
.office-card.blue::before {
  background: var(--blue);
}

.metric-card.amber,
.office-card.amber {
  border-color: #f2e3c4;
}

.metric-card.amber::before,
.office-card.amber::before {
  background: var(--amber);
}

.metric-card.coral,
.office-card.coral {
  border-color: #f1d9d4;
}

.metric-card.coral::before,
.office-card.coral::before {
  background: var(--coral);
}

.metric-card.violet,
.office-card.violet {
  border-color: #e2ddfb;
}

.metric-card.violet::before,
.office-card.violet::before {
  background: var(--violet);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 16px;
  align-items: start;
}

.panel {
  min-width: 0;
}

.map-panel {
  align-self: start;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.1;
}

.panel-head.compact {
  padding-bottom: 14px;
}

.filter-row select {
  width: 164px;
}

.leaflet-shell {
  position: relative;
  height: min(70vh, 720px);
  min-height: 540px;
  overflow: hidden;
  background: #eef2f1;
  border-radius: 0 0 8px 8px;
}

.leaflet-map {
  width: 100%;
  height: 100%;
  background: #eef2f1;
}

.leaflet-map.is-street-map {
  background: #eef2f1;
}

.leaflet-map.is-picking-location {
  cursor: crosshair;
}

.leaflet-container {
  font: inherit;
  background: #eef2f1;
}

.leaflet-map.is-street-map .leaflet-tile-pane img {
  filter: saturate(1.02) contrast(1.03) brightness(1.02);
}

.leaflet-boundary-pane path {
  vector-effect: non-scaling-stroke;
}

.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22) !important;
}

.leaflet-control-zoom a {
  color: #0c1116 !important;
  border-color: var(--line) !important;
}

.zone-label {
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 850;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
  white-space: nowrap;
}

.leaflet-map.is-street-map .zone-label {
  color: #0f172a;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.96),
    0 0 8px rgba(255, 255, 255, 0.86);
}

.street-label {
  color: rgba(226, 232, 240, 0.72);
  font-size: 9px;
  font-weight: 760;
  line-height: 1;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(5, 8, 13, 0.9);
  white-space: nowrap;
}

.leaflet-map.is-street-map .street-label {
  color: rgba(51, 65, 85, 0.74);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.96),
    0 0 7px rgba(255, 255, 255, 0.86);
}

.locality-label {
  color: rgba(226, 232, 240, 0.76);
  font-size: 10px;
  font-weight: 780;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(5, 8, 13, 0.9);
  white-space: nowrap;
}

.leaflet-map.is-street-map .locality-label {
  color: rgba(15, 23, 42, 0.78);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 0 7px rgba(255, 255, 255, 0.85);
}

.property-pin {
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.property-pin.point-rented {
  background: var(--green);
}

.property-pin.point-available {
  background: var(--blue);
}

.property-pin.point-warning {
  background: var(--amber);
}

.property-pin.point-stuck {
  background: var(--coral);
}

.property-pin.point-muted {
  opacity: 0.18;
}

.property-pin.point-estimated {
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.26);
}

.map-note,
.map-legend {
  position: absolute;
  z-index: 500;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.map-note {
  left: 18px;
  top: 18px;
  max-width: min(430px, calc(100% - 36px));
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 760;
}

.map-legend {
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: calc(100% - 36px);
  padding: 10px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.rented {
  background: var(--green);
}

.dot.available {
  background: var(--blue);
}

.dot.warning {
  background: var(--amber);
}

.dot.stuck {
  background: var(--coral);
}

.dot.estimated {
  background: transparent;
  border: 2px dashed #cbd5e1;
}

.zone-panel {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.zone-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 8px;
  overflow: clip;
  border-bottom: 1px solid var(--line);
}

.zone-pill {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  color: #475569;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.zone-pill.is-active {
  color: #ffffff;
  background: var(--green);
  border-color: var(--green);
}

.zone-stats {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 8px;
  padding: 12px 16px 14px;
  border-bottom: 1px solid var(--line);
}

.mini-stat,
.rent-box,
.drawer-box {
  padding: 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-stat strong,
.mini-stat span,
.rent-box span,
.rent-box strong {
  display: block;
}

.mini-stat strong {
  font-size: 20px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.mini-stat span,
.rent-box span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.zone-list,
.dense-list,
.managed-list,
.action-list,
.quality-list,
.bar-list,
.manager-list {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
  overflow: auto;
}

.zone-list {
  overflow: visible;
}

.property-card,
.dense-item,
.pipeline-card,
.insight-item,
.quality-item,
.manager-item,
.managed-item {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 12px;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.property-card:hover,
.dense-item:hover,
.pipeline-card:hover,
.insight-item:hover,
.managed-item:hover,
tr[data-id]:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.property-card strong,
.dense-item strong,
.pipeline-card strong,
.managed-item strong {
  color: var(--ink);
  font-size: 14px;
}

.property-meta,
.dense-meta,
.managed-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #334155;
  background: #edf2f7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.chip.green {
  color: #087455;
  background: var(--green-soft);
}

.chip.blue {
  color: #1d5bb6;
  background: var(--blue-soft);
}

.chip.amber {
  color: #8a560c;
  background: var(--amber-soft);
}

.chip.coral {
  color: #a54232;
  background: var(--coral-soft);
}

.chip.violet {
  color: #5e44bf;
  background: var(--violet-soft);
}

.management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.property-manager {
  grid-row: span 2;
}

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

.office-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.office-list {
  display: grid;
  gap: 8px;
  padding: 14px 16px 16px;
}

.office-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.office-item strong,
.office-item p,
.office-money strong,
.office-money span {
  display: block;
}

.office-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.office-money {
  flex: 0 0 auto;
  min-width: 160px;
  text-align: right;
}

.office-money strong {
  font-size: 15px;
}

.office-money span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.office-money small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.25;
}

.property-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(145px, 1fr));
  gap: 12px;
  padding: 16px;
}

.property-form label:has(#propertyAddress),
.property-form label:has(#propertyOwner),
.property-form label:has(#propertyLeasingCommission) {
  grid-column: span 2;
}

.property-form label:has(#propertyLatitude),
.property-form label:has(#propertyLongitude) {
  display: none;
}

.address-field {
  position: relative;
  z-index: 4;
}

.address-field:focus-within {
  z-index: 40;
}

.address-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: grid;
  gap: 6px;
  max-height: 310px;
  padding: 6px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.address-suggestions:empty {
  display: none;
}

.address-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

.address-suggestion:hover,
.address-suggestion.is-active {
  background: #f1f5f9;
  border-color: #dbe4ef;
}

.address-suggestion strong,
.address-suggestion small {
  display: block;
}

.address-suggestion strong {
  font-size: 13px;
  line-height: 1.25;
}

.address-suggestion small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  line-height: 1.25;
}

.address-suggestion em {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #0f766e;
  background: #e6fffa;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.geocode-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 320px) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.geocode-copy strong,
.geocode-copy span {
  display: block;
}

.geocode-copy strong {
  font-size: 14px;
}

.geocode-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.provider-settings {
  display: grid;
  gap: 8px;
}

.provider-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  color: #0f766e;
  background: #e6fffa;
  border: 1px solid #b6f3df;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.provider-status.is-premium {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.provider-settings details {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.provider-settings summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;
}

.provider-settings summary::-webkit-details-marker {
  display: none;
}

.token-field {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.geocode-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.geocode-result {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.geocode-result:hover {
  border-color: var(--green);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.geocode-result strong {
  font-size: 13px;
}

.geocode-result span,
.geocode-empty span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.geocode-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
}

.geocode-empty button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  color: #334155;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 820;
}

.office-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

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

.location-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: #8a560c;
  background: var(--amber-soft);
  border: 1px solid #f2e3c4;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.location-status.is-exact {
  color: #087455;
  background: var(--green-soft);
  border-color: #bfe9dc;
}

.location-status.is-estimated {
  color: #8a560c;
  background: var(--amber-soft);
  border-color: #f2e3c4;
}

.precision-panel {
  align-self: start;
}

.map-quality {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.precision-summary {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.precision-summary span,
.precision-summary strong,
.precision-item strong,
.precision-item p {
  display: block;
}

.precision-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.precision-summary strong {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1;
}

.precision-track {
  height: 8px;
  overflow: hidden;
  background: #e2e8f0;
  border-radius: 999px;
}

.precision-track span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.precision-split {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

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

.precision-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.precision-item strong {
  color: var(--ink);
  font-size: 13px;
}

.precision-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.precision-item button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  color: #0c1116;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 840;
}

.managed-list {
  max-height: 432px;
}

.managed-actions button {
  min-height: 30px;
  padding: 0 9px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 820;
}

.office-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}

.office-actions button {
  min-height: 28px;
  padding: 0 9px;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 820;
}

.control-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(420px, 1.28fr) minmax(300px, 0.98fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.dense-list {
  max-height: 560px;
}

.dense-item p,
.pipeline-card p,
.insight-item p,
.quality-item p,
.manager-item p,
.managed-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ipc-panel {
  min-height: 0;
}

.control-feature {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-color: #dbe4ef;
}

.ipc-grid,
.rent-summary {
  display: grid;
  gap: 10px;
  padding: 16px 16px 0;
}

.ipc-grid {
  grid-template-columns: minmax(0, 1fr) 144px;
}

.rent-summary {
  grid-template-columns: repeat(3, 1fr);
  padding-top: 12px;
}

.rent-box strong {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.1;
}

.button-row {
  display: flex;
  gap: 10px;
  padding: 14px 16px 16px;
  flex-wrap: wrap;
}

.ghost-button,
.secondary-button,
.primary-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 850;
}

.ghost-button,
.secondary-button {
  color: #475569;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.primary-button {
  color: #ffffff;
  background: #0c1116;
  border: 1px solid #0c1116;
}

.ghost-button:disabled,
.secondary-button:disabled,
.primary-button:disabled {
  cursor: default;
  opacity: 0.48;
}

.pipeline-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 16px;
}

.pipeline-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.pipeline-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  color: #334155;
  background: #edf2f7;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.control-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.insight-item strong,
.quality-item strong,
.manager-item strong {
  font-size: 14px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-meta,
.manager-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.bar-meta span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  background: #edf2f7;
  border-radius: 999px;
}

.bar-track span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.portfolio-panel {
  margin-top: 16px;
}

.table-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #526071;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 880;
}

td {
  color: #263241;
  font-size: 13px;
}

tr[data-id] {
  cursor: pointer;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(15, 23, 42, 0.34);
}

.property-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1000;
  width: min(720px, 100%);
  height: 100dvh;
  overflow: hidden;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(100%);
}

.property-drawer.is-open {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 3;
  min-height: 38px;
  padding: 0 14px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
}

#drawerContent {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.drawer-title {
  padding: 24px 72px 14px 24px;
}

.drawer-title-360 {
  display: grid;
  gap: 12px;
}

.drawer-title h2 {
  margin: 3px 0 0;
  font-size: 28px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.drawer-title .property-meta {
  gap: 6px;
}

.drawer-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.drawer-hero-stats div {
  min-width: 0;
  padding: 16px 24px;
}

.drawer-hero-stats div + div {
  border-left: 1px solid var(--line);
}

.drawer-hero-stats span,
.drawer-hero-stats strong {
  display: block;
}

.drawer-hero-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.drawer-hero-stats strong {
  margin-top: 5px;
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.drawer-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 22px;
  padding: 0 24px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.drawer-tabs::-webkit-scrollbar {
  display: none;
}

.drawer-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0;
  color: #657286;
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.drawer-tabs button::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.drawer-tabs button.is-active {
  color: #0c1116;
}

.drawer-tabs button.is-active::after {
  background: var(--green);
}

.drawer-tabs button span {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  padding: 0 5px;
  place-items: center;
  color: #ffffff;
  background: #dc5b48;
  border-radius: 999px;
  font-size: 10px;
}

.drawer-tab-content {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-view {
  display: grid;
  gap: 18px;
}

.drawer-section-title {
  display: block;
}

.drawer-section-title h3 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
}

.drawer-box span,
.drawer-box strong {
  display: block;
}

.drawer-box span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.drawer-box strong {
  margin-top: 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.timeline {
  height: 10px;
  overflow: hidden;
  background: #edf2f7;
  border-radius: 999px;
}

.timeline span {
  display: block;
  height: 100%;
  background: var(--green);
}

.drawer-note {
  padding: 14px;
  color: #374151;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.45;
}

.drawer-note > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.drawer-note p {
  margin: 6px 0 0;
}

.drawer-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.drawer-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  padding: 14px 24px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
}

.drawer-actions button {
  flex: 0 0 auto;
  min-height: 40px;
}

.drawer-inline-action {
  justify-self: start;
}

.drawer-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.debt-amount {
  color: var(--coral);
}

.contract-heading,
.payment-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.contract-percent {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.contract-timeline {
  height: 8px;
}

.payment-state {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.payment-state.is-paid {
  color: #087c64;
  background: #d9f8ef;
}

.payment-state.is-pending {
  color: #a54232;
  background: var(--coral-soft);
}

.contact-list {
  border-top: 1px solid var(--line);
}

.contact-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.contact-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  color: #0f684f;
  background: #dff8ee;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  place-items: center;
}

.contact-main > span,
.contact-main > strong {
  display: block;
}

.contact-main > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.contact-main > strong {
  margin-top: 2px;
  font-size: 16px;
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.contact-actions {
  display: flex;
  gap: 6px;
}

.contact-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: #1758b5;
  background: var(--blue-soft);
  border: 1px solid #cfe0fb;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.service-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.service-status-grid div {
  min-width: 0;
  padding: 13px 10px;
}

.service-status-grid div + div {
  border-left: 1px solid var(--line);
}

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

.service-status-grid span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-status-grid strong {
  margin-top: 4px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.service-status-grid .is-empty {
  color: #a54232;
}

.drawer-documents {
  display: grid;
  gap: 14px;
}

.drawer-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer-section-head span,
.drawer-section-head strong {
  display: block;
}

.drawer-section-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.drawer-section-head strong {
  margin-top: 3px;
  font-size: 14px;
}

.document-upload {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  color: #0c1116;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.document-upload input {
  display: none;
}

.document-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.document-item strong,
.document-item span {
  display: block;
}

.document-item strong {
  font-size: 13px;
}

.document-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.document-item button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 9px;
  color: #a54232;
  background: var(--coral-soft);
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

.history-note-form {
  display: grid;
  gap: 7px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.history-note-form label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.history-note-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.history-note-form textarea {
  min-height: 68px;
  padding: 10px 11px;
  resize: vertical;
  color: #17202a;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
}

.history-list {
  display: grid;
}

.history-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  min-height: 76px;
}

.history-item:not(:last-child)::before {
  position: absolute;
  top: 12px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.history-marker {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 4px;
  background: #94a3b8;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #94a3b8;
}

.history-payment,
.history-contract {
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.history-document,
.history-location {
  background: #2878e8;
  box-shadow: 0 0 0 1px #2878e8;
}

.history-item time,
.history-item strong {
  display: block;
}

.history-item time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-item strong {
  margin-top: 3px;
  font-size: 14px;
}

.history-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  min-width: 230px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  color: #ffffff;
  background: #0c1116;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
}

.commission-rule {
  grid-column: span 2;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 4px 18px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  background: var(--green-soft);
  border: 1px solid #bfe9db;
  border-radius: 8px;
}

.commission-rule span,
.commission-rule small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.commission-rule strong {
  grid-row: span 2;
  text-align: right;
  font-size: 18px;
}

.payments-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(540px, 600px);
  align-items: center;
}

.payments-actions,
.payment-toolbar,
.portfolio-controls {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.payments-actions {
  display: grid;
  grid-template-columns: 160px minmax(210px, 1fr) 170px;
}

.payments-actions label,
.portfolio-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payments-actions input,
.payments-actions select {
  min-width: 170px;
}

.compact-search {
  min-width: 240px;
}

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

.commission-policies {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.commission-policies div {
  min-width: 0;
  padding: 13px 15px;
}

.commission-policies div + div {
  border-left: 1px solid var(--line);
}

.commission-policies span,
.commission-policies strong {
  display: block;
}

.commission-policies span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 880;
  text-transform: uppercase;
}

.commission-policies strong {
  margin-top: 4px;
  font-size: 14px;
}

.payment-metric {
  min-width: 0;
  padding: 15px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-metric-action {
  width: 100%;
  color: inherit;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease;
}

.payment-metric-action:hover {
  background: #fff9f7;
  border-color: #efb8ae;
}

.payment-metric-action:focus-visible {
  outline: 3px solid rgba(220, 90, 68, 0.2);
  outline-offset: 2px;
}

.payment-metric-action.is-selected {
  background: #fff6f4;
  border-color: var(--coral);
  box-shadow: inset 3px 0 0 var(--coral);
}

.payment-metric-action:disabled {
  cursor: default;
  opacity: 0.68;
}

.payment-metric span,
.payment-metric strong,
.payment-metric small {
  display: block;
}

.payment-metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 880;
  text-transform: uppercase;
}

.payment-metric strong {
  margin-top: 7px;
  font-size: 24px;
  line-height: 1;
}

.payment-metric small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.payment-metric.is-alert strong {
  color: var(--coral);
}

.payment-panel {
  overflow: hidden;
}

.payment-panel-head {
  margin: 0;
}

.payment-toolbar > span {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.payment-table-wrap {
  max-height: calc(100vh - 315px);
  min-height: 420px;
}

.payment-table {
  min-width: 1650px;
}

.payment-table th,
.payment-table td {
  padding: 9px 10px;
}

.payment-table td:first-child {
  min-width: 210px;
  color: var(--ink);
  font-weight: 820;
}

.payment-address strong,
.payment-address span,
.commission-value strong,
.commission-value span,
.payment-debt strong,
.payment-debt span {
  display: block;
}

.payment-address span {
  margin-top: 4px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 850;
}

.commission-value,
.payment-debt {
  min-width: 120px;
}

.commission-value strong,
.payment-debt strong {
  font-size: 13px;
  white-space: nowrap;
}

.commission-value span,
.payment-debt span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
}

.payment-debt.is-active strong {
  color: var(--coral);
}

.payment-detail-button {
  min-height: 34px;
  padding: 0 11px;
  color: #1758b5;
  background: var(--blue-soft);
  border: 1px solid #cfe0fb;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.payment-table select,
.payment-table input {
  width: 100%;
  min-width: 102px;
  min-height: 34px;
  padding: 0 9px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 760;
}

.payment-table input[type="number"] {
  min-width: 120px;
  text-align: right;
}

.payment-table tr.is-pending td {
  background: #fff8f6;
}

.payment-table tr.is-incomplete td:first-child::after {
  content: "Datos incompletos";
  display: block;
  margin-top: 3px;
  color: var(--amber);
  font-size: 10px;
  font-weight: 850;
}

.payment-table tr.has-debt td:first-child {
  box-shadow: inset 3px 0 0 var(--coral);
}

.payment-table .status-paid {
  color: #08765a;
  background: var(--green-soft);
  border-color: #bfe9db;
}

.payment-table .status-pending {
  color: #a54232;
  background: var(--coral-soft);
  border-color: #ffd4cd;
}

.payment-detail-content {
  padding-top: 20px;
}

.payment-movement-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.payment-movement-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.payment-movement-form input,
.payment-movement-form select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.movement-note-field,
.movement-file-field {
  grid-column: span 2;
}

.payment-movement-form > button {
  align-self: end;
  justify-self: start;
}

.payment-movement-section {
  display: grid;
  gap: 12px;
}

.payment-movement-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.payment-movement-list {
  border-top: 1px solid var(--line);
}

.payment-movement-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.movement-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 8px;
  color: #334155;
  background: #edf2f7;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 880;
  text-align: center;
}

.movement-debt {
  color: #a54232;
  background: var(--coral-soft);
}

.movement-partial {
  color: #08765a;
  background: var(--green-soft);
}

.movement-receipt {
  color: #1758b5;
  background: var(--blue-soft);
}

.payment-movement-main > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  align-items: baseline;
}

.payment-movement-main strong {
  font-size: 14px;
}

.payment-movement-main time {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.payment-movement-main p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.movement-file {
  display: block;
  margin-top: 7px;
  color: #1758b5;
  font-size: 11px;
  font-weight: 800;
}

.payment-movement-item > button {
  min-height: 28px;
  padding: 0 9px;
  color: #a54232;
  background: var(--coral-soft);
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 850;
}

.portfolio-controls {
  align-items: center;
}

.portfolio-controls select {
  min-width: 190px;
}

.portfolio-panel table {
  min-width: 1520px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  color: #455468;
  background: #edf2f7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.source-chip.is-public {
  color: #1758b5;
  background: var(--blue-soft);
}

.drawer-note a {
  display: inline-block;
  margin-top: 8px;
  color: #1758b5;
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 1260px) {
  .metrics-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .map-layout,
  .management-grid,
  .office-grid {
    grid-template-columns: 1fr;
  }

  .property-manager {
    grid-row: auto;
  }

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

  .zone-panel {
    max-height: none;
  }

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

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

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

  .property-form,
  .office-form {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .geocode-panel {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
  }

  .geocode-panel .secondary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .app-header {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nav-list {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .header-date {
    text-align: left;
  }

  .workspace {
    padding: 16px;
  }

  .command-bar {
    display: grid;
  }

  .module-head {
    display: grid;
  }

  .payments-actions,
  .portfolio-controls {
    width: 100%;
    justify-content: stretch;
  }

  .payments-head,
  .payments-actions {
    grid-template-columns: 1fr;
  }

  .payments-actions label,
  .portfolio-controls label {
    flex: 1;
    min-width: 170px;
  }

  .command-actions {
    justify-content: stretch;
  }

  .search-box,
  .segmented {
    width: 100%;
  }

  .segment {
    flex: 1;
  }

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

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-row {
    width: 100%;
    justify-content: stretch;
  }

  .filter-row label,
  .filter-row .segmented {
    flex: 1;
    min-width: 170px;
  }

  .filter-row select {
    width: 100%;
  }

  .leaflet-shell {
    height: 520px;
    min-height: 430px;
  }

  .ipc-grid,
  .rent-summary,
  .control-metrics,
  .drawer-grid,
  .property-form,
  .office-summary,
  .office-form {
    grid-template-columns: 1fr;
  }

  .property-form label:has(#propertyAddress),
  .property-form label:has(#propertyOwner),
  .property-form label:has(#propertyLeasingCommission) {
    grid-column: auto;
  }

  .geocode-panel {
    grid-template-columns: 1fr;
  }

  .geocode-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .office-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .office-money {
    min-width: 0;
    text-align: left;
  }

  .commission-rule {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .command-bar h1 {
    font-size: 34px;
  }

  .drawer-close {
    top: 14px;
    right: 14px;
  }

  .drawer-title {
    padding: 18px 74px 12px 16px;
  }

  .drawer-title h2 {
    font-size: 23px;
  }

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

  .drawer-hero-stats div {
    padding: 12px 16px;
  }

  .drawer-hero-stats div:nth-child(3) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .drawer-hero-stats strong {
    font-size: 15px;
  }

  .drawer-tabs {
    gap: 18px;
    padding: 0 16px;
  }

  .drawer-tab-content {
    padding: 18px 16px;
  }

  .drawer-actions {
    padding: 11px 16px;
  }

  .contact-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .contact-avatar {
    width: 42px;
    height: 42px;
  }

  .contact-actions {
    grid-column: 2;
  }

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

  .service-status-grid div + div {
    border-left: 0;
  }

  .service-status-grid div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .service-status-grid div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .history-note-form > div {
    grid-template-columns: 1fr;
  }

  .history-note-form button {
    justify-self: start;
  }

  .commission-policies {
    grid-template-columns: 1fr;
  }

  .commission-policies div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .payment-movement-form {
    grid-template-columns: 1fr;
  }

  .movement-note-field,
  .movement-file-field {
    grid-column: auto;
  }

  .payment-movement-item {
    grid-template-columns: 1fr;
  }

  .payment-movement-item > button {
    justify-self: start;
  }

  .payment-movement-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics-grid,
  .payment-summary,
  .zone-stats {
    grid-template-columns: 1fr;
  }

  .commission-rule {
    grid-template-columns: 1fr;
  }

  .commission-rule strong {
    grid-row: auto;
    text-align: left;
  }

  .leaflet-shell {
    height: 430px;
  }

  .map-note {
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .map-legend {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}
