/* Data editor. Built for Spencer, not for a developer — every knob that used
   to be a constant in a source file is an input here. */

*, *::before, *::after { box-sizing: border-box; }

/* Tokens come from theme.css. These two are the editor's own vocabulary:
   amber means "sandbox, not live", red means "this value is wrong". */
:root {
  --amber: #e0a63b;
  --amber-on: #2b1c00;
  --red: var(--danger);
}
:root[data-theme="light"] {
  --amber: #b4740a;
  --amber-on: #fff8e8;
}

/* Same scrollbar treatment as the planner — the editor is the same dark shell
   and a grey OS slab breaks it. See styles.css for the reasoning. */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--thumb) transparent;
  }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--thumb);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-thumb:active { background: var(--cc-lt); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

html, body { height: 100%; min-width: 1250px; min-height: 760px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  overflow: auto;
}

/* ================================ chrome ================================= */

.top { flex: none; display: flex; align-items: center; gap: 20px; padding: 13px 22px; background: var(--cc); white-space: nowrap; }
.logo { flex: none; height: 42px; width: 63px; object-fit: cover; border-radius: 8px; }
.ttl { flex: 1; min-width: 0; }
.ttl h1 { margin: 0; font-size: 17px; font-weight: 800; }
.ttl p { margin: 1px 0 0; font-size: 12.5px; color: rgba(255,255,255,.66); }

.modesw { display: flex; flex: none; border: 1.5px solid rgba(255,255,255,.28); border-radius: 9px; overflow: hidden; }
.modesw button { padding: 8px 18px; border: 0; background: transparent; color: rgba(255,255,255,.72); font: 700 13.5px/1 inherit; font-family: inherit; cursor: pointer; }
.modesw button.on { background: #fff; color: var(--cc); }
.modesw button#modeSand.on { background: var(--amber); color: var(--amber-on); }

.acts { display: flex; flex: none; gap: 8px; }
.btn {
  padding: 9px 15px; border: 1.5px solid var(--line); border-radius: 9px;
  background: var(--panel-2); color: var(--ink);
  font: 700 13.5px/1 inherit; font-family: inherit; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
  white-space: nowrap;
}
.btn:hover { border-color: var(--line-2); background: var(--panel-3); }
.top .btn { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.1); color: #fff; }
.btn.warn { border-color: var(--danger-line); color: var(--danger-ink); background: var(--danger-bg); }
.btn.warn:hover { background: var(--danger-bg); }

.banner { flex: none; display: none; padding: 9px 22px; font-size: 13px; font-weight: 700; }
.banner.on { display: block; background: var(--amber); color: var(--amber-on); }

.tabs { flex: none; display: flex; gap: 4px; padding: 10px 22px 0; background: var(--track); border-bottom: 1px solid var(--line); }
.tab {
  padding: 10px 17px; border: 1px solid transparent; border-bottom: 0;
  border-radius: 9px 9px 0 0; background: transparent; color: var(--muted);
  font: 700 13.5px/1 inherit; font-family: inherit; cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.on { background: var(--bg); border-color: var(--line); color: var(--ink); margin-bottom: -1px; }

.editor-savebar {
  position: sticky; top: 0; z-index: 15;
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 10px 22px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 8px 22px rgba(0,0,0,.12); backdrop-filter: blur(14px);
}
.editor-save-copy { flex: 1; min-width: 0; }
.editor-save-copy strong { display: block; color: var(--muted); font-size: 13px; }
.editor-save-copy span { display: block; margin-top: 1px; color: var(--muted-2); font-size: 11.5px; }
.editor-savebar.dirty .editor-save-copy strong { color: var(--warn-ink); }
.editor-savebar .btn:disabled { opacity: .45; cursor: default; }
.editor-savebar .btn.save { border-color: var(--cc); background: var(--cc); color: #fff; }
.editor-savebar .btn.save:hover:not(:disabled) { background: var(--cc-dk); }

.wrap { flex: 1; min-height: 620px; overflow-y: auto; padding: 20px 22px 60px; }
.pane[hidden] { display: none; }

/* ================================ tables ================================= */

.bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.search {
  flex: 1; max-width: 340px; height: 40px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 9px;
  background: var(--panel-2); color: var(--ink);
  font: 500 14.5px/1 inherit; font-family: inherit; outline: none;
}
.search:focus { border-color: var(--cc-lt); }
.count { font-size: 13px; color: var(--muted); font-weight: 600; }

.tablewrap { border: 1px solid var(--line); border-radius: 11px; overflow: auto; max-height: calc(100vh - 560px); min-height: 220px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
#tab-props .tbl { min-width: 1680px; }
#tab-crews .tbl { min-width: 820px; }
.tbl thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel); text-align: left; padding: 10px 11px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl th.num, .tbl td.num { text-align: right; }
.tbl th.w-name { min-width: 230px; }
.tbl th.w-addr { min-width: 205px; }
#tab-props .tbl th:nth-child(4) { min-width: 145px; }
#tab-props .tbl th:nth-child(5) { min-width: 125px; }
#tab-props .tbl th:nth-child(6) { min-width: 195px; }
#tab-props .tbl th:nth-child(7) { min-width: 210px; }
.tbl tbody tr { border-bottom: 1px solid var(--line); }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl tbody tr.sel { background: var(--panel-3); box-shadow: inset 3px 0 0 var(--amber); }
.tbl tbody tr.inactive { opacity: .58; }
.tbl tbody tr.inactive:hover { opacity: .82; }
.tbl tbody tr.crew-division-row,
.tbl tbody tr.crew-division-row:hover {
  opacity: 1; background: var(--track); border-top: 1px solid var(--line-2);
}
.crew-division-row td {
  padding: 9px 12px; color: var(--cc-lt); font-size: 11px; font-weight: 900;
  letter-spacing: .09em; text-transform: uppercase;
}
.tbl td { padding: 3px 5px; }

.cell {
  width: 100%; padding: 7px 7px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: var(--ink);
  font: 500 13.5px/1.3 inherit; font-family: inherit; outline: none;
}
.cell:hover { border-color: var(--line-2); }
.cell:focus { border-color: var(--cc-lt); background: var(--track); }
.cell.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell.bad { border-color: var(--red); background: var(--danger-bg); }
.cell-read {
  display: block; width: 100%; padding: 7px 7px; color: var(--ink);
  font: 500 13.5px/1.3 inherit; font-family: inherit; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.cell-read.num { text-align: right; font-variant-numeric: tabular-nums; }
select.cell { cursor: pointer; }
select.cell option { background: var(--panel); color: var(--ink); }
.service-days { min-width: 190px; }
.schedule-toggle { width: 18px; height: 18px; accent-color: var(--cc-lt); cursor: pointer; }

.del { border: 0; background: transparent; color: var(--muted-2); cursor: pointer; font-size: 15px; padding: 5px 9px; border-radius: 7px; }
.del:hover { color: var(--red); background: var(--danger-bg); }

.hint { margin: 14px 0 0; font-size: 13px; line-height: 1.55; color: var(--muted); max-width: 760px; }
.hint b { color: var(--ink); }

/* Divisions are first-class data, not a hard-coded list. The summary makes it
   obvious when a division has properties but no qualified active crew. */
.division-manager {
  max-width: 1100px; margin-bottom: 18px; padding: 17px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
.division-manager h2 { margin: 0; font-size: 18px; }
.division-manager p { margin: 3px 0 12px; color: var(--muted); font-size: 12.5px; }
.division-list { display: flex; flex-wrap: wrap; gap: 8px; }
.division-chip {
  display: flex; align-items: center; gap: 10px; min-width: 180px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2);
}
.division-chip > span { display: grid; flex: 1; }
.division-chip strong { font-size: 13px; }
.division-chip small { color: var(--muted); font-size: 10.5px; }
.division-remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.division-remove:hover { color: var(--danger-ink); }
.division-add { display: flex; gap: 8px; margin-top: 12px; }
.division-add input {
  width: min(320px, 100%); padding: 9px 11px; border: 1.5px solid var(--line);
  border-radius: 9px; background: var(--panel-2); color: var(--ink); font: inherit;
}

/* ========================== Crew Mobile details =========================
   These operational fields belong together. Keeping them out of the already
   wide scheduling table makes them readable and gives gate/shutoff notes room
   to be written like instructions rather than squeezed into one-line cells. */

.crew-details {
  margin-top: 16px; padding: 18px;
  border: 1px solid var(--line-2); border-radius: 13px;
  background: var(--panel);
}
.crew-details-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  margin-bottom: 15px;
}
.crew-details-kicker {
  display: block; margin-bottom: 3px;
  color: var(--cc-lt); font-size: 10px; font-weight: 900;
  letter-spacing: .13em; text-transform: uppercase;
}
.crew-details h2 { margin: 0; font-size: 17px; line-height: 1.25; }
.crew-details-head p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.crew-details-status {
  flex: none; min-width: 140px; padding-top: 4px;
  color: var(--muted); font-size: 12px; font-weight: 800; text-align: right;
}
.crew-details-status.saved { color: var(--cc-lt); }
.crew-details-fields {
  min-width: 0; margin: 0; padding: 0; border: 0;
  display: grid; grid-template-columns: 190px repeat(2, minmax(0, 1fr)); gap: 13px 16px;
}
.crew-details-fields:disabled { opacity: .52; }
.crew-field { display: block; min-width: 0; }
.crew-field > span {
  display: block; margin-bottom: 5px;
  color: var(--muted); font-size: 10.5px; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase;
}
.crew-field input,
.crew-field textarea {
  width: 100%; padding: 10px 11px;
  border: 1.5px solid var(--line); border-radius: 9px;
  background: var(--panel-2); color: var(--ink);
  font: 500 13.5px/1.4 inherit; font-family: inherit; outline: none;
}
.crew-field input { height: 41px; }
.crew-field textarea { min-height: 78px; resize: vertical; }
.crew-field input:hover,
.crew-field textarea:hover { border-color: var(--line-2); }
.crew-field input:focus,
.crew-field textarea:focus { border-color: var(--cc-lt); box-shadow: 0 0 0 3px var(--ok-bg); }
.crew-field.short input { max-width: 190px; font-weight: 800; letter-spacing: .08em; }
.crew-field.wide { grid-column: 1 / -1; }
.crew-language-head {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: 9px;
  margin-top: 3px; padding-top: 13px; border-top: 1px solid var(--line);
}
.crew-language-head strong { font-size: 13px; }
.crew-language-head span { color: var(--muted); font-size: 11.5px; }

@media (max-width: 900px) {
  .crew-details-fields { grid-template-columns: 1fr; }
  .crew-language-head, .crew-field.wide { grid-column: 1; }
}

/* =============================== settings ================================ */

.settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; max-width: 1100px; }
.set { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.set label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 3px; }
.set p { margin: 0 0 9px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.set input {
  width: 100%; height: 38px; padding: 0 11px;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--panel-2); color: var(--ink);
  font: 700 15px/1 inherit; font-family: inherit; outline: none;
  font-variant-numeric: tabular-nums;
}
.set input:focus { border-color: var(--cc-lt); }

.impact { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); max-width: 1100px; }
.impact h3 { margin: 0 0 10px; font-size: 14px; }
.impact-out { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.iv { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.iv-k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.iv-v { font-size: 21px; font-weight: 800; margin-top: 2px; }
.iv-v small { font-size: 13px; font-weight: 600; color: var(--muted); }
.iv.warn .iv-v { color: var(--danger-ink); }

.optimizer-box {
  margin-top: 18px; max-width: 1100px; padding: 16px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px;
  align-items: center; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--panel);
}
.optimizer-box h3 { margin: 0 0 5px; font-size: 15px; }
.optimizer-box p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.optimizer-state { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.optimizer-state.ok { color: var(--cc-lt); font-weight: 700; }
.optimizer-state.bad { color: var(--danger-ink); font-weight: 700; }
@media (max-width: 700px) {
  .optimizer-box { grid-template-columns: 1fr; }
  .optimizer-box .btn { width: 100%; justify-content: center; }
}

/* ================================ cards ================================== */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 13px; max-width: 1100px; }
.card { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.card.danger { border-color: var(--danger-line); }
.card h3 { margin: 0 0 7px; font-size: 14.5px; }
.card p { margin: 0 0 13px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.card code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.state { font-weight: 700; color: var(--cc-lt) !important; }

/* ================================ toast ================================== */

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  padding: 11px 20px; border-radius: 999px;
  background: var(--cc-lt); color: var(--accent-on);
  font-size: 14px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s;
  z-index: 20;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--red); color: #fff; }


/* ================================= map ===================================
   Sits under the table on the Properties tab. Deliberately not a modal — you
   want to see the pin move while you're still looking at the row. */

.mapzone { margin-top: 16px; }

.mapzone-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.mapzone-k {
  font-size: 11px; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.mapzone-sel {
  flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.small.armed { border-color: var(--amber); background: var(--amber); color: var(--amber-on); }

.mapzone-map {
  position: relative;
  height: 340px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--panel-2);
}
.mapzone-map canvas { outline: none; }

/* Address column — wide enough for "10181 Juniper Creek Ln" without wrapping
   every row, and it truncates rather than pushing the numeric columns off. */
.tbl .w-addr { min-width: 190px; }

/* ========================= add-property workflow ======================== */

body.modal-open { overflow: hidden; }

.property-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  padding: clamp(12px, 3vw, 34px);
  background: color-mix(in srgb, #001b12 76%, transparent);
  backdrop-filter: blur(7px);
}
.property-modal[hidden] { display: none; }
.property-dialog [hidden] { display: none !important; }

.property-dialog {
  width: min(1180px, 100%); max-height: calc(100vh - 24px);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 18px;
  background: var(--bg); color: var(--ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

.property-dialog-head {
  display: flex; justify-content: space-between; gap: 20px; align-items: flex-start;
  padding: 20px 22px 17px; border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.property-dialog-head h2 { margin: 2px 0 3px; font-size: 24px; line-height: 1.1; }
.property-dialog-head p { margin: 0; color: var(--muted); font-size: 13px; }
.property-kicker {
  color: var(--cc-lt); font-size: 10px; font-weight: 900;
  letter-spacing: .14em; text-transform: uppercase;
}
.property-close {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel-2); color: var(--ink);
  font: 500 26px/1 inherit; cursor: pointer;
}
.property-close:hover { border-color: var(--cc-lt); }

.property-dialog-body {
  min-height: 0; overflow: auto; padding: 18px 22px;
  display: grid; grid-template-columns: minmax(330px, .86fr) minmax(420px, 1.14fr);
  gap: 20px;
}
.property-form, .property-map-panel {
  min-width: 0; padding: 16px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel);
}

.property-field { display: grid; gap: 6px; }
.property-field > span {
  color: var(--muted); font-size: 10.5px; font-weight: 900;
  letter-spacing: .1em; text-transform: uppercase;
}
.property-field small { font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.property-field input, .property-field select {
  width: 100%; min-width: 0; height: 42px; padding: 0 11px;
  border: 1.5px solid var(--line); border-radius: 9px;
  background: var(--panel-2); color: var(--ink); outline: none;
  font: 650 14px/1.2 inherit;
}
.property-field input:focus, .property-field select:focus {
  border-color: var(--cc-lt); box-shadow: 0 0 0 3px var(--ok-bg);
}
.property-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.property-fields {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin-top: 16px;
}
.property-field.wide { grid-column: 1 / -1; }
.activation-field {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); cursor: pointer;
}
.activation-field > input { width: 18px; height: 18px; margin-top: 2px; padding: 0; accent-color: var(--cc-lt); }
.activation-field > span { display: grid; gap: 2px; letter-spacing: 0; text-transform: none; }
.activation-field strong { color: var(--ink); font-size: 13px; }
.activation-field small { color: var(--muted); font-size: 11px; line-height: 1.4; }
.property-help { min-height: 19px; margin: 8px 1px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.property-help.error { color: var(--danger-ink); font-weight: 700; }
.manual-place {
  margin: 1px 0 0; padding: 0; border: 0; background: none;
  color: var(--cc-lt); font: 750 11.5px/1.4 inherit; cursor: pointer;
}
.manual-place:hover { text-decoration: underline; }
.manual-place.armed { color: var(--amber); }

.address-results {
  margin-top: 7px; max-height: 218px; overflow: auto;
  border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--panel-2); box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.address-result {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px; padding: 10px 12px; text-align: left;
  border: 0; border-bottom: 1px solid var(--line); background: transparent;
  color: var(--ink); cursor: pointer;
}
.address-result:last-child { border-bottom: 0; }
.address-result:hover, .address-result:focus { background: var(--ok-bg); outline: none; }
.address-result strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.address-result span { grid-column: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.address-result em {
  grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal;
  color: var(--cc-lt); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
}

.verification-list { display: grid; gap: 7px; margin-top: 16px; }
.verification-list > div {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel-2); font-size: 12px;
}
.verification-list span { color: var(--muted); font-weight: 700; }
.verify { text-align: right; font-size: 11px; }
.verify.pending { color: var(--muted); }
.verify.ok { color: var(--cc-lt); }
.verify.warn { color: var(--amber); }
.verify.bad { color: var(--danger-ink); }

.property-map-panel { display: flex; flex-direction: column; }
.property-map-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; }
.property-map-head > div { display: grid; gap: 2px; }
.property-map-head strong { font-size: 14px; }
.property-map-head span { color: var(--muted); font-size: 11px; }
.property-map {
  position: relative; flex: 1 1 330px; min-height: 330px;
  border: 1px solid var(--line); border-radius: 11px; overflow: hidden;
  background: var(--panel-2);
}
.property-map canvas { outline: none; }
.property-map .cc-drag-pin { position: relative; width: 42px; height: 42px; cursor: grab; }
.property-map .cc-drag-pin:active { cursor: grabbing; }
.property-map .cc-drag-pin-core {
  position: absolute; inset: 6px; border-radius: 50% 50% 50% 10%;
  transform: rotate(-45deg); border: 3px solid var(--panel);
  box-shadow: 0 5px 16px rgba(0,0,0,.38), 0 0 0 6px rgba(255,255,255,.15);
}
.property-map .cc-drag-pin-core::after {
  content: ""; position: absolute; inset: 8px; border-radius: 50%; background: rgba(255,255,255,.9);
}
.property-map .cc-drag-pin-search .cc-drag-pin-core { background: #e0a63b; }
.property-map .cc-drag-pin-property .cc-drag-pin-core { background: var(--cc-lt); }
.property-map .cc-drag-pin-label {
  position: absolute; left: 50%; top: 44px; transform: translateX(-50%);
  width: max-content; max-width: 190px; padding: 5px 8px; border-radius: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  box-shadow: 0 4px 14px rgba(0,0,0,.25); font: 700 11px/1.2 inherit;
}
.property-map .cc-drag-pin-search .cc-drag-pin-label { top: -30px; }
.pin-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.pin-legend > div { display: flex; gap: 7px; align-items: flex-start; color: var(--muted); font-size: 11px; line-height: 1.35; }
.pin-legend strong { color: var(--ink); }
.pin-dot { width: 10px; height: 10px; margin-top: 2px; flex: 0 0 auto; border-radius: 50%; }
.pin-dot.property { background: #e0a63b; box-shadow: 0 0 0 3px rgba(224,166,59,.2); }
.pin-dot.entrance { background: var(--cc-lt); box-shadow: 0 0 0 3px var(--ok-bg); }
.pin-confirm {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 12px;
  padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel-2); font-size: 12px; line-height: 1.4; cursor: pointer;
}
.pin-confirm input { width: 17px; height: 17px; margin: 0; accent-color: var(--cc-lt); }

.property-review { overflow: auto; padding: 22px; }
.property-review h3 { margin: 4px 0 14px; font-size: 20px; }
.property-review > p { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.property-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.property-summary > div { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.property-summary span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9.5px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.property-summary strong { display: block; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; }
.property-summary .wide { grid-column: span 2; }

.property-dialog-actions {
  display: flex; align-items: center; gap: 9px; padding: 13px 22px;
  border-top: 1px solid var(--line); background: var(--panel);
}
.property-action-status { flex: 1; color: var(--muted); font-size: 12px; }
.property-action-status.error { color: var(--danger-ink); font-weight: 700; }

@media (max-width: 850px) {
  .property-modal { padding: 0; }
  .property-dialog { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .property-dialog-body { grid-template-columns: 1fr; }
  .property-map { min-height: 320px; }
  .property-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .property-dialog-head, .property-dialog-body, .property-review { padding-left: 14px; padding-right: 14px; }
  .property-fields, .pin-legend, .property-summary { grid-template-columns: 1fr; }
  .property-field.wide, .property-summary .wide { grid-column: 1; }
  .property-dialog-actions { padding: 11px 14px; flex-wrap: wrap; }
  .property-action-status { flex-basis: 100%; order: -1; }
  .property-dialog-actions .btn { flex: 1; justify-content: center; }
}
