:root {
  --ink: #09204a;
  --muted: #5f6f8d;
  --line: #dbe5f4;
  --panel: rgba(255, 255, 255, .96);
  --blue: #1769dc;
  --green: #28a955;
  --red: #ef2d32;
  --amber: #d98b08;
  --shadow: 0 18px 55px rgba(13, 35, 76, .18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #eef4fb;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 28px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 18px rgba(10, 32, 74, .08);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #1e75e6, #092d74);
  box-shadow: 0 12px 24px rgba(23, 105, 220, .22);
}
.brand-mark svg { width: 34px; height: 34px; }
.brand strong {
  display: block;
  font-size: 22px;
  letter-spacing: .02em;
}
.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.topnav, .button-row, .tool-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-link, .primary-button, .ghost-button, .success-button, .outline-button, .map-tool {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.icon-link:hover, .ghost-button:hover, .outline-button:hover, .map-tool:hover {
  transform: translateY(-1px);
  border-color: #b8c9e6;
  box-shadow: 0 10px 26px rgba(11, 37, 86, .12);
}
.primary-button {
  color: #fff;
  border-color: #0d60d0;
  background: linear-gradient(135deg, #1773ec, #0c55c3);
  box-shadow: 0 13px 28px rgba(23, 105, 220, .28);
}
.success-button {
  color: #fff;
  border-color: #1c9649;
  background: linear-gradient(135deg, #2ab45d, #148541);
  box-shadow: 0 12px 24px rgba(40, 169, 85, .24);
}
.outline-button { border-color: #1769dc; color: #1769dc; }
.ghost-button.full, .success-button.full, .outline-button.full { width: 100%; }
.jump-trigger.active {
  color: #1769dc;
  border-color: #a7c7f7;
  background: #eef6ff;
}
.icon-link svg, .primary-button svg, .ghost-button svg, .success-button svg, .outline-button svg, .map-tool svg { width: 19px; height: 19px; }

.app-shell {
  display: grid;
  grid-template-columns: 380px minmax(560px, 1fr) 300px;
  gap: 16px;
  padding: 16px;
}
.left-panel, .right-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step, .result-panel, .legend-card, .inspector-card, .feature-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.step h2, .result-panel h2, .legend-card h2, .inspector-card h2, .feature-card h2 {
  margin: 0;
  padding: 16px 18px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}
.step h2 {
  color: #fff;
  background: linear-gradient(135deg, #0d2b61, #08204d);
}
.step h2 span {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #0d2b61;
  background: #fff;
}
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px;
}
.tab {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faff;
  color: var(--ink);
  font-weight: 800;
}
.tab.active {
  color: #fff;
  background: #1769dc;
  border-color: #1769dc;
}
.tab-panel { display: none; padding: 0 12px 14px; }
.tab-panel.active { display: block; }
.field-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 4px 0 8px;
}
textarea {
  width: 100%;
  min-height: 142px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  line-height: 1.42;
  outline: none;
}
textarea:focus, input[type="range"]:focus { border-color: #1769dc; box-shadow: 0 0 0 3px rgba(23, 105, 220, .12); }
.hint { color: var(--muted); line-height: 1.5; margin: 0 0 12px; }
.source-toggle, .layer-grid {
  padding: 14px;
  display: grid;
  gap: 9px;
}
.source-toggle label, .layer-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbff;
  padding: 0 11px;
  color: var(--ink);
  font-weight: 800;
}
.layer-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 0;
}
.chip-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}
.range-row {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 800;
}
.range-row strong { color: var(--ink); }
input[type="range"] { width: 100%; accent-color: #1769dc; }
.step .success-button { margin: 12px 14px 16px; width: calc(100% - 28px); }

.map-area {
  min-height: calc(100vh - 120px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}
.map-toolbar, .bottom-summary {
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.map-title strong { display: block; text-transform: uppercase; letter-spacing: .04em; }
.map-title span { color: var(--muted); font-weight: 700; }
.map-tool.active {
  color: #1769dc;
  border-color: #9fc0f4;
  background: #edf5ff;
}
.map-stage {
  position: relative;
  min-height: 620px;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 20%, rgba(114, 177, 88, .75), transparent 24%),
    radial-gradient(circle at 72% 42%, rgba(31, 97, 65, .8), transparent 26%),
    linear-gradient(135deg, #5e8a47, #213e35 42%, #8a7a4b 62%, #2c593d);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), var(--shadow);
}
.map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(26deg, transparent 0 44%, rgba(236,238,230,.82) 45% 48%, transparent 49%),
    linear-gradient(155deg, transparent 0 53%, rgba(236,238,230,.78) 54% 56%, transparent 57%),
    linear-gradient(90deg, rgba(255,255,255,.06), rgba(0,0,0,.12));
  display: none;
}
#leafletMap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.simple-osm {
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.simple-osm:active { cursor: grabbing; }
.simple-osm-pane {
  position: absolute;
  inset: 0;
}
.simple-osm-pane img {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none;
  user-select: none;
  pointer-events: none;
}
.leaflet-container {
  font: inherit;
  background: #dbe7f2;
}
.leaflet-control-zoom a {
  width: 38px;
  height: 38px;
  line-height: 38px;
  color: var(--ink);
  border: 0 !important;
  background: #fff;
}
.leaflet-control-zoom {
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(13, 35, 76, .18);
}
.leaflet-control-scale-line {
  border-color: #0c2e63;
  color: #0c2e63;
  background: rgba(255,255,255,.86);
  font-weight: 800;
}
#wmsOverlay, #mapCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
#wmsOverlay {
  object-fit: fill;
  z-index: 1;
  opacity: .96;
  pointer-events: none;
}
#mapCanvas { z-index: 2; }
.map-callout {
  position: absolute;
  z-index: 4;
  min-width: 210px;
  max-width: 310px;
  border-radius: 8px;
  background: rgba(8, 24, 55, .92);
  color: #fff;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,.28);
  pointer-events: none;
}
.map-callout strong { display: block; margin-bottom: 4px; }
.map-callout span { color: #c9d9f5; font-size: 13px; }
.mini-map {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  width: 138px;
  height: 92px;
  border: 3px solid #fff;
  border-radius: 8px;
  overflow: hidden;
  background: #244b38;
  box-shadow: 0 14px 35px rgba(0,0,0,.25);
}
.mini-map canvas { width: 100%; height: 100%; }
.mini-map span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4px 0;
  color: #fff;
  text-align: center;
  background: rgba(0,0,0,.42);
  font-size: 12px;
  font-weight: 800;
}
.bottom-summary {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  min-height: 96px;
}
.bottom-summary > div {
  display: grid;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding: 0 18px;
}
.bottom-summary > div:last-child { border-right: 0; }
.bottom-summary span { color: var(--muted); font-weight: 800; font-size: 12px; text-transform: uppercase; }
.bottom-summary strong { font-size: 28px; color: #1769dc; }
.summary-brand {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
}
.summary-brand svg { width: 42px; height: 42px; color: #1769dc; }
.summary-brand strong { font-size: 17px; color: var(--ink); text-transform: uppercase; }

.legend-card, .inspector-card, .feature-card { padding-bottom: 12px; }
.legend-card h2, .inspector-card h2, .feature-card h2, .result-panel h2 { background: #fff; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #edf2fb;
  font-weight: 800;
}
.legend-item button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--item-color);
}
.legend-line {
  width: 30px;
  height: 0;
  border-top: 3px dashed var(--item-color);
}
#inspector {
  margin: 12px;
  padding: 14px;
  min-height: 150px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff, #fff);
  border: 1px solid var(--line);
}
#inspector strong { display: block; margin-bottom: 8px; }
#inspector p { margin: 0 0 8px; color: var(--muted); line-height: 1.45; }
.inspector-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  font-size: 13px;
}
.inspector-grid span:nth-child(odd) { color: var(--muted); font-weight: 800; }
.feature-list {
  display: grid;
  gap: 8px;
  max-height: 330px;
  overflow: auto;
  padding: 12px;
}
.feature-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}
.feature-row button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--row-color);
}
.feature-row strong { display: block; font-size: 13px; }
.feature-row span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.status-card {
  margin: 12px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
}
.status-card span { color: var(--muted); }
.status-card.safe { background: #effaf2; border-color: #bfe9ca; color: #0f7a38; }
.status-card.warn { background: #fff7e8; border-color: #f3d08b; color: #a96600; }
.status-card.danger { background: #fff0f0; border-color: #f2b7ba; color: #bd2229; }
.metric-list { padding: 0 12px 12px; display: grid; gap: 8px; }
.metric {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  font-size: 13px;
}
.metric span { color: var(--muted); }

.calc-grid {
  display: grid;
  gap: 10px;
  padding: 14px;
}
.calc-grid label, .client-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.calc-grid input, .client-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}
.calc-grid label {
  grid-template-columns: 1fr 96px auto;
  align-items: center;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
.calc-grid label span { color: var(--ink); font-weight: 900; }
.compensation-card .outline-button { margin: 0 14px 12px; width: calc(100% - 28px); }
.compensation-result {
  margin: 0 14px 16px;
  border: 1px solid #cbdcf4;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 6px;
  background: linear-gradient(135deg, #f8fbff, #eef6ff);
}
.compensation-result strong {
  color: #1769dc;
  font-size: 22px;
}
.compensation-result span { color: var(--muted); line-height: 1.45; }
.compensation-result em {
  color: #9a6405;
  font-style: normal;
  font-weight: 800;
}

.legal-market {
  margin: 0 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,255,.98));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.market-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 26px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(7, 31, 73, .96), rgba(14, 81, 168, .88)),
    radial-gradient(circle at 82% 28%, rgba(75, 148, 255, .45), transparent 34%);
}
.market-head span {
  color: #b9d6ff;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .08em;
  font-size: 12px;
}
.market-head h2 {
  margin: 4px 0 6px;
  font-size: 30px;
}
.market-head p {
  margin: 0;
  color: #d8e8ff;
  max-width: 760px;
}
.market-grid {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.25fr) minmax(300px, .8fr);
  gap: 16px;
  padding: 16px;
}
.market-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(13, 35, 76, .08);
}
.market-card h3 {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.client-form textarea {
  min-height: 104px;
  margin-bottom: 10px;
}
.consent {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px !important;
  padding: 10px;
  border: 1px solid #d6e4f7;
  border-radius: 8px;
  background: #f7fbff;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.35;
}
.consent input { min-height: auto; margin-top: 2px; }
.board-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.board-toolbar .tab {
  min-height: 36px;
  padding: 0 12px;
}
.inquiry-list, .law-firm-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}
.inquiry-card, .law-firm-card {
  border: 1px solid #dce7f6;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, #fff, #f9fbff);
}
.inquiry-card header, .law-firm-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.inquiry-card strong, .law-firm-card strong { display: block; }
.inquiry-card small, .law-firm-card small { color: var(--muted); font-weight: 800; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #eaf3ff;
  color: #1769dc;
  font-size: 12px;
  font-weight: 900;
}
.badge.warn { color: #a96600; background: #fff4df; }
.badge.ok { color: #0f7a38; background: #e9f8ef; }
.inquiry-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin: 10px 0;
}
.inquiry-actions, .firm-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mini-button {
  min-height: 34px;
  border: 1px solid #c9daf3;
  border-radius: 8px;
  background: #fff;
  color: #1769dc;
  padding: 0 10px;
  font-weight: 900;
}
.mini-button.primary {
  color: #fff;
  border-color: #1769dc;
  background: #1769dc;
}
.mini-button.success {
  color: #fff;
  border-color: #1c9649;
  background: #1c9649;
}
.offer-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.offer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 8px;
  background: #f0f6ff;
  padding: 8px;
  font-size: 13px;
}
.law-firm-card p, .inquiry-card p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1280px) {
  .app-shell { grid-template-columns: 340px 1fr; }
  .right-panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); }
  .market-grid { grid-template-columns: 1fr 1fr; }
  .office-board { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .topbar { height: auto; padding: 14px; align-items: flex-start; flex-direction: column; }
  .topnav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .app-shell { grid-template-columns: 1fr; padding: 10px; }
  .map-stage { min-height: 520px; }
  .bottom-summary { grid-template-columns: 1fr 1fr; }
  .bottom-summary > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .right-panel { grid-template-columns: 1fr; }
  .market-head { flex-direction: column; align-items: flex-start; }
  .market-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Technical search-first layout */
:root {
  --tech-font: Bahnschrift, "DIN 2014", "Arial Narrow", "Roboto Condensed", "Segoe UI", sans-serif;
}
body {
  font-family: var(--tech-font);
  font-size: 14px;
  letter-spacing: 0;
  background: #f6f9fe;
}
a { color: inherit; text-decoration: none; }
strong, h1, h2, h3, button, .brand strong {
  font-weight: 600;
}
.topbar {
  height: 78px;
  box-shadow: 0 1px 14px rgba(8, 31, 73, .06);
}
.brand strong { font-size: 20px; }
.brand small { font-size: 11px; font-weight: 500; }
.icon-link, .primary-button, .ghost-button, .success-button, .outline-button, .map-tool {
  min-height: 38px;
  font-weight: 500;
  border-radius: 7px;
}
.app-shell {
  grid-template-columns: 320px minmax(430px, 1fr) minmax(430px, 520px);
  align-items: start;
}
.filters-card, .tools-card {
  background: #fff;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(16, 43, 84, .07);
  overflow: hidden;
}
.filters-card h2, .tools-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 15px 18px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #e8eef7;
}
.filters-card h2 button {
  border: 0;
  background: transparent;
  color: #1769dc;
  font-size: 12px;
}
.filter-group {
  padding: 14px 18px;
  border-top: 1px solid #edf2f8;
  display: grid;
  gap: 10px;
}
.filter-group h3 {
  margin: 0 0 4px;
  color: #09204a;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filter-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1d3155;
  font-size: 13px;
}
.filters-card .primary-button {
  width: calc(100% - 36px);
  margin: 16px 18px 18px;
}
.tools-card {
  padding-bottom: 14px;
}
.tools-card .ghost-button, .tools-card .outline-button {
  width: calc(100% - 28px);
  margin: 10px 14px 0;
}
.tools-card details {
  margin: 12px 14px 0;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  padding: 10px;
}
.tools-card summary {
  color: #1769dc;
  cursor: pointer;
  font-weight: 600;
}
.search-main {
  display: grid;
  gap: 14px;
}
.search-hero {
  display: grid;
  grid-template-columns: 1fr 325px;
  gap: 18px;
  align-items: center;
}
.search-hero h1 {
  margin: 0 0 8px;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.search-hero p {
  margin: 0;
  color: #314565;
  line-height: 1.45;
}
.trust-card {
  min-height: 90px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px 14px;
  align-items: center;
  border: 1px solid #cbdcf4;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}
.trust-card svg {
  width: 40px;
  height: 40px;
  color: #1769dc;
  grid-row: span 2;
}
.trust-card span { color: #1769dc; font-weight: 600; }
.trust-card small { color: #314565; line-height: 1.4; }
.search-card {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  padding: 14px 18px;
  box-shadow: 0 12px 34px rgba(16, 43, 84, .07);
}
.search-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
}
.search-tabs .tab {
  width: auto;
  min-height: 32px;
  padding: 0 4px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #52627d;
}
.search-tabs .tab.active {
  color: #0f5fd0;
  border-bottom-color: #0f5fd0;
}
.search-line {
  display: grid;
  grid-template-columns: 1fr 150px 160px;
  gap: 10px;
}
.search-line input, .search-line select, #resultSort {
  min-height: 42px;
  border: 1px solid #d4dfef;
  border-radius: 8px;
  background: #fff;
  color: #10264b;
  padding: 0 12px;
  outline: none;
}
.examples {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #53647f;
  font-size: 13px;
}
.examples button {
  border: 0;
  border-radius: 7px;
  min-height: 30px;
  padding: 0 14px;
  background: #f1f5fb;
  color: #24385a;
}
.suggestions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.suggestion-row {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fbfdff;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  cursor: pointer;
}
.suggestion-row:hover { border-color: #9fc0f4; background: #f2f7ff; }
.suggestion-row strong { color: #10264b; }
.suggestion-row span { color: #64748f; font-size: 12px; }
.results-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.results-head strong { display: block; font-size: 16px; text-transform: uppercase; }
.results-head span { display: block; color: #53647f; margin-top: 3px; }
.parcel-results {
  display: grid;
  gap: 10px;
}
.empty-results, .parcel-card {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 43, 84, .05);
}
.empty-results {
  padding: 24px;
  color: #53647f;
  text-align: center;
}
.parcel-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 15px;
}
.parcel-card h3 { margin: 0 0 5px; font-size: 16px; }
.parcel-card p { margin: 0; color: #52627d; line-height: 1.45; }
.parcel-card .badge { justify-self: start; margin-top: 8px; }
.parcel-actions {
  display: grid;
  align-content: center;
  gap: 8px;
}
.details-grid {
  display: grid;
  grid-template-columns: 320px minmax(420px, 1fr) 420px;
  gap: 16px;
  margin: 0 16px 16px;
}
.map-area {
  position: sticky;
  top: 94px;
}
.map-stage {
  min-height: 560px;
  background: #dbe7f2;
}
#wmsOverlay {
  opacity: .42;
  mix-blend-mode: multiply;
  image-rendering: auto;
}
#mapCanvas {
  z-index: 2;
  pointer-events: none;
}
body.draw-mode #mapCanvas {
  pointer-events: none;
}
.bottom-summary {
  grid-template-columns: 1.2fr repeat(4, minmax(84px, 1fr));
  min-height: 78px;
}
.bottom-summary strong { font-size: 21px; }
.result-panel .button-row { padding: 0 12px 12px; }
.layer-grid { display: none; }

@media (max-width: 1380px) {
  .app-shell { grid-template-columns: 300px 1fr; }
  .map-area { position: relative; top: auto; grid-column: 1 / -1; }
  .details-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .search-hero, .search-line { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .map-stage { min-height: 460px; }
}

.content-page {
  max-width: 1040px;
  margin: 26px auto;
  padding: 0 18px;
  display: grid;
  gap: 16px;
}
.content-page.narrow { max-width: 520px; }
.content-card {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(16, 43, 84, .07);
  padding: 22px;
}
.content-card h1, .content-card h2 {
  margin: 0 0 10px;
  font-weight: 600;
}
.content-card p {
  color: #40536f;
  line-height: 1.55;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 820px) {
  .content-grid { grid-template-columns: 1fr; }
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid #cfe0f5;
  border-radius: 6px;
  background: #f4f8fd;
  color: #1769dc;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-page {
  min-height: calc(100vh - 94px);
  align-content: start;
}
.auth-card {
  display: grid;
  gap: 16px;
}
.auth-card h1,
.dashboard-hero h1 {
  margin: 0;
  color: #0a1f44;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .01em;
}
.role-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.role-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  color: #17345c;
  text-align: left;
  box-shadow: 0 8px 24px rgba(16, 43, 84, .05);
}
.role-card svg {
  width: 24px;
  height: 24px;
  color: #1769dc;
}
.role-card strong {
  font-size: 15px;
  font-weight: 600;
}
.role-card span {
  color: #52627d;
  font-size: 12px;
  line-height: 1.45;
}
.role-card.active {
  border-color: #1769dc;
  background: #f3f8ff;
  box-shadow: 0 12px 30px rgba(23, 105, 220, .12);
}
.lawyer-extra {
  border-top: 1px solid #e3ebf6;
  padding-top: 14px;
}
.form-status {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fbff;
  color: #314565;
  font-size: 13px;
}
.form-status.success {
  border-color: #bce6c7;
  background: #f0fbf3;
  color: #176b34;
}
.form-status.danger {
  border-color: #ffd0d0;
  background: #fff5f5;
  color: #9b1c1c;
}
.form-status a { color: #0f5fd0; }
.dashboard-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 18px 40px;
  display: grid;
  gap: 16px;
}
.dashboard-hero {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(16, 43, 84, .06);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.dashboard-hero p {
  margin: 8px 0 0;
  color: #40536f;
  line-height: 1.5;
  max-width: 760px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 460px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.dashboard-grid.wide {
  grid-template-columns: 430px minmax(0, 1fr);
}
.dashboard-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.dashboard-card,
.offer-card {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fbfdff;
  padding: 14px;
  display: grid;
  gap: 10px;
}
.dashboard-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.dashboard-card strong {
  color: #10264b;
  font-weight: 600;
}
.dashboard-card small,
.lead-grid,
.offer-card span {
  color: #52627d;
  font-size: 12px;
}
.dashboard-card p,
.offer-card p {
  margin: 0;
  color: #314565;
  line-height: 1.5;
}
.offer-list {
  display: grid;
  gap: 8px;
}
.offer-card {
  background: #fff;
}
.empty-results.small {
  padding: 12px;
  font-size: 12px;
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stats-strip article {
  min-height: 78px;
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 43, 84, .05);
  padding: 12px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 3px 10px;
  align-items: center;
}
.stats-strip svg {
  grid-row: span 2;
  width: 25px;
  height: 25px;
  color: #1769dc;
}
.stats-strip span {
  color: #52627d;
  font-size: 11px;
  text-transform: uppercase;
}
.stats-strip strong {
  color: #10264b;
  font-size: 13px;
  font-weight: 600;
}
.form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.offer-form {
  border-top: 1px solid #e3ebf6;
  padding-top: 12px;
  display: grid;
  gap: 10px;
}
.offer-form textarea,
.client-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d4dfef;
  border-radius: 8px;
  background: #fff;
  color: #10264b;
  padding: 10px 12px;
  outline: none;
}
.offer-form textarea {
  min-height: 86px;
  resize: vertical;
}
.lead-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
button:disabled {
  opacity: .62;
  cursor: wait;
  transform: none !important;
}

@media (max-width: 980px) {
  .dashboard-hero,
  .dashboard-grid,
  .dashboard-grid.wide,
  .stats-strip,
  .role-switch,
  .lead-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero {
    display: grid;
  }
}
