html {
  font-size: 16px;
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: #1c2528;
  background: #f6f4ef;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-nav {
  min-height: 64px;
  border-bottom: 1px solid rgba(28, 37, 40, 0.11);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.app-nav .container-fluid {
  min-height: 64px;
}

.navbar-brand {
  color: #213c3a;
  font-weight: 800;
}

.nav-link {
  color: #4d5a58;
  font-weight: 650;
}

.navbar-status {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
  color: #596261;
  font-size: 0.86rem;
  font-weight: 750;
}

.header-view-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: auto;
  margin-right: 14px;
}

.header-view-tabs a,
.header-view-tabs button {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: #344746;
  background: transparent;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
}

.header-view-tabs a:hover,
.header-view-tabs a.active,
.header-view-tabs button:hover,
.header-view-tabs button.active {
  color: #ffffff;
  background: #213c3a;
}

.navbar-status form {
  margin: 0;
}

.navbar-status button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: #213c3a;
  background: #e7ddd2;
  font-weight: 800;
}

.app-shell {
  width: 100%;
}

.app-shell-login {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background: #f6f4ef;
}

.login-card {
  width: min(100%, 420px);
  display: grid;
  gap: 16px;
  padding: 34px;
  border: 1px solid rgba(28, 37, 40, 0.13);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(28, 37, 40, 0.08);
}

.login-card h1 {
  margin-bottom: 0;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: #4b5657;
  font-size: 0.9rem;
  font-weight: 800;
}

.login-intro {
  margin: -6px 0 4px;
  color: #596261;
  font-weight: 650;
}

.login-error {
  padding: 11px 12px;
  border: 1px solid #e2b7a5;
  border-radius: 8px;
  color: #7a331f;
  background: #fff2ed;
  font-weight: 750;
}

.login-submit {
  width: 100%;
  margin-top: 4px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 370px) minmax(0, 1fr);
  min-height: calc(100vh - 104px);
}

.search-panel {
  position: sticky;
  top: 64px;
  align-self: start;
  min-height: calc(100vh - 64px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 28px;
  border-right: 1px solid rgba(28, 37, 40, 0.1);
  background: #ffffff;
}

.eyebrow {
  margin: 0 0 8px;
  color: #9a5b39;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0 0 24px;
  color: #213c3a;
  font-size: 2rem;
  font-weight: 850;
  line-height: 1.08;
}

h2 {
  margin: 0;
  color: #213c3a;
  font-size: 1.55rem;
  font-weight: 820;
}

h3 {
  margin: 0;
  color: #192527;
  font-size: 1.18rem;
  font-weight: 800;
}

.field-label,
.filter-grid label {
  color: #4b5657;
  font-size: 0.83rem;
  font-weight: 750;
  min-width: 0;
}

.advisor-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: -8px 0 22px;
  padding: 13px;
  border: 1px solid rgba(160, 137, 101, 0.38);
  border-radius: 8px;
  background: #fbf7ef;
}

.advisor-photo-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  overflow: hidden;
  border: 5px solid #a99574;
  border-radius: 50%;
  background: #e8ebe8;
}

.advisor-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.advisor-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #2f6862;
  font-size: 2rem;
  font-weight: 850;
}

.advisor-card strong {
  display: block;
  color: #213c3a;
  font-size: 1.08rem;
  font-weight: 850;
}

.advisor-card span {
  color: #596261;
  font-size: 0.9rem;
  font-weight: 650;
}

.advisor-card.photo-missing .advisor-photo-wrap {
  border-color: #2f6862;
}

textarea,
input[type="number"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="datetime-local"],
select {
  width: 100%;
  border: 1px solid #c9d2cf;
  border-radius: 8px;
  color: #1c2528;
  background: #f9faf8;
  outline: none;
}

textarea:focus,
input[type="number"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="datetime-local"]:focus,
select:focus {
  border-color: #2f6862;
  box-shadow: 0 0 0 3px rgba(47, 104, 98, 0.16);
}

textarea {
  margin: 8px 0 18px;
  padding: 12px;
  resize: vertical;
}

input[type="number"] {
  margin-top: 6px;
  padding: 10px;
}

input[type="text"] {
  margin-top: 6px;
  padding: 9px 10px;
}

input[type="email"],
input[type="tel"],
input[type="password"],
input[type="datetime-local"] {
  margin-top: 6px;
  padding: 9px 10px;
}

select {
  min-width: 150px;
  margin-top: 5px;
  padding: 8px 10px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.filter-grid select,
.filter-grid input {
  min-width: 0;
}

.client-picker {
  display: grid;
  gap: 10px;
}

.client-picker label {
  display: grid;
  gap: 5px;
  color: #4b5657;
  font-size: 0.83rem;
  font-weight: 750;
}

.client-picker select,
.client-picker input {
  min-width: 0;
}

.client-search-status {
  margin-top: -3px;
  color: #6f7775;
  font-size: 0.78rem;
  font-weight: 750;
}

.auto-search-form {
  display: grid;
  gap: 14px;
}

.criteria-builder {
  display: grid;
  gap: 12px;
}

.criteria-section {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid #dfe4df;
  border-radius: 8px;
  background: #fbfcfa;
}

.criteria-section > strong {
  color: #153638;
  font-size: 0.82rem;
}

.optional-label {
  color: #6f7775;
  font-size: 0.78rem;
  font-weight: 650;
}

.budget-surface-grid label {
  display: grid;
  grid-template-rows: 2.35em auto;
  gap: 6px;
  align-content: start;
}

.budget-surface-grid .filter-label {
  align-self: end;
  line-height: 1.18;
}

.budget-surface-grid input,
.budget-surface-grid select {
  width: 100%;
  margin-top: 0;
}

.start-search textarea[readonly] {
  background: #f8fbf9;
  color: #173638;
  cursor: default;
}

.auto-criteria {
  display: grid;
  gap: 6px;
  margin: -6px 0 16px;
  padding: 13px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  background: #f7f8f6;
}

.auto-criteria strong {
  color: #213c3a;
  font-size: 0.86rem;
}

.auto-criteria span {
  color: #596261;
  font-size: 0.82rem;
  font-weight: 750;
}

.criteria-list {
  display: grid;
  gap: 9px;
  margin: 20px 0;
}

.criteria-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #253436;
  font-weight: 650;
}

.criteria-list input {
  width: 18px;
  height: 18px;
  accent-color: #2f6862;
}

.provider-test-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 9px;
  align-items: center;
  margin: -4px 0 16px;
  padding: 10px;
  border: 1px solid #d9cdc0;
  border-radius: 8px;
  color: #213c3a;
  background: #fbf7ef;
  font-size: 0.88rem;
  font-weight: 850;
}

.provider-test-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #9a5b39;
}

.provider-test-toggle span {
  grid-column: 2;
  color: #7b6654;
  font-size: 0.78rem;
  font-weight: 750;
}

.compact-toggle {
  margin: 10px 0 0;
}

.search-mode-selector {
  display: grid;
  gap: 8px;
}

.search-mode-selector label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 9px;
  padding: 10px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  background: #f9faf8;
  cursor: pointer;
}

.search-mode-selector input {
  grid-row: span 2;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: #2f6862;
}

.search-mode-selector strong {
  color: #213c3a;
  font-size: 0.86rem;
}

.search-mode-selector span {
  color: #65706d;
  font-size: 0.78rem;
  font-weight: 650;
}

.advanced-filters {
  margin: 0 0 18px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  background: #f9faf8;
}

.advanced-filters summary {
  padding: 12px;
  color: #213c3a;
  cursor: pointer;
  font-weight: 850;
}

.advanced-filters .filter-grid {
  padding: 0 12px 12px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-action,
.secondary-action,
.view-tabs button,
.view-tabs a {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.primary-action {
  color: #ffffff;
  background: #2f6862;
}

.secondary-action {
  color: #213c3a;
  background: #e7ddd2;
}

.full-width-action {
  width: 100%;
  margin-top: 10px;
}

.insight-box {
  display: grid;
  gap: 5px;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #dfd6ca;
  border-radius: 8px;
  background: #fbf7ef;
}

.insight-box span {
  color: #596261;
  font-size: 0.92rem;
}

.results-area {
  padding: 28px;
}

.results-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.view-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.view-tabs button,
.view-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  color: #4b5657;
  background: transparent;
  text-decoration: none;
}

.view-tabs .active {
  color: #ffffff;
  background: #213c3a;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

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

.kpi-row div {
  display: grid;
  gap: 3px;
  min-height: 78px;
  padding: 15px;
  border: 1px solid rgba(28, 37, 40, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.kpi-row strong {
  color: #9a5b39;
  font-size: 1.55rem;
  line-height: 1;
}

.kpi-row span {
  color: #596261;
  font-size: 0.88rem;
  font-weight: 700;
}

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

.web-results-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.web-status {
  align-self: start;
  padding: 7px 10px;
  border-radius: 8px;
  color: #213c3a;
  background: #dcebe6;
  font-size: 0.84rem;
  font-weight: 800;
}

.search-plan-panel,
.search-details-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.search-details-panel summary {
  cursor: pointer;
  color: #213c3a;
  font-weight: 850;
}

.search-plan-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.search-plan-summary span {
  padding: 10px;
  border: 1px solid #e2e7e4;
  border-radius: 8px;
  color: #4f5b5b;
  background: #f9faf8;
  font-size: 0.82rem;
  font-weight: 750;
}

.search-plan-summary strong {
  color: #9a5b39;
  font-size: 1.15rem;
}

.search-plan-columns,
.diagnostic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 14px;
}

.query-plan-list,
.diagnostic-list {
  display: grid;
  gap: 8px;
  margin: 9px 0 0;
  padding: 0;
}

.query-plan-list {
  padding-left: 20px;
}

.query-plan-list li,
.diagnostic-list article {
  padding: 10px;
  border: 1px solid #e2e7e4;
  border-radius: 8px;
  background: #f9faf8;
}

.query-plan-list code,
.diagnostic-list code {
  display: block;
  color: #213c3a;
  font-size: 0.82rem;
  font-weight: 850;
  white-space: normal;
}

.query-plan-list span,
.diagnostic-list span,
.diagnostic-list a {
  display: block;
  margin-top: 4px;
  color: #596261;
  font-size: 0.78rem;
  font-weight: 700;
}

.diagnostic-list a {
  color: #213c3a;
  font-weight: 850;
}

.diagnostic-warning {
  border-left: 3px solid #b46b37;
  background: #fbf5eb;
  padding: 10px 12px;
  margin: 10px 0;
  font-size: 0.86rem;
  font-weight: 800;
}

.diagnostic-error {
  color: #8a352d !important;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 9px 0 0;
}

.pill-list span {
  padding: 6px 8px;
  border-radius: 8px;
  color: #344243;
  background: #eef1ef;
  font-size: 0.78rem;
  font-weight: 800;
}

.confirm-deep-search {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.provider-label {
  display: inline-flex;
  margin-top: 4px;
  color: #65706d;
  font-size: 0.82rem;
  font-weight: 800;
}

.ranked-results-head {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 4px;
}

.ranked-results-head h3 {
  margin: 0;
  color: #192527;
  font-size: 1.05rem;
  font-weight: 850;
}

.ranked-results-head span {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 8px;
  color: #213c3a;
  background: #e7efeb;
  font-size: 0.82rem;
  font-weight: 850;
}

.web-result-list {
  display: grid;
  gap: 12px;
}

.web-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  background: #f9faf8;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.web-result-card:hover,
.web-result-card:focus-visible {
  border-color: #8faea7;
  box-shadow: 0 5px 16px rgba(27, 67, 62, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.web-result-content-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.web-result-content-link:hover,
.web-result-content-link:focus-visible {
  color: inherit;
  text-decoration: none;
  outline: none;
}

.web-result-card h4 {
  margin: 5px 0 7px;
  color: #192527;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.25;
}

.web-result-image {
  width: 180px;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  margin: 8px 0 10px;
  object-fit: cover;
  border: 1px solid #d8e1dc;
  border-radius: 8px;
  background: #edf1ef;
}

.web-result-card p {
  margin: 0 0 7px;
  color: #4f5b5b;
  font-size: 0.9rem;
  line-height: 1.4;
}

.web-result-card small {
  color: #65706d;
  font-weight: 700;
}

.web-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.web-proof-grid span,
.web-proof-list span {
  padding: 7px 8px;
  border-radius: 8px;
  color: #344243;
  background: #eef1ef;
  font-size: 0.78rem;
  font-weight: 800;
}

.web-proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 9px;
}

.web-proof-list strong {
  color: #213c3a;
  font-size: 0.82rem;
}

.criterion-comparison-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.criterion-comparison {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.criterion-comparison strong {
  margin-right: 4px;
}

.criterion-comparison.ok {
  color: #18413c;
  background: #dcebe6;
}

.criterion-comparison.error {
  color: #742f2f;
  background: #f3d9d5;
}

.criterion-comparison.unknown {
  color: #594b13;
  background: #f3e9b9;
}

.web-technical-details {
  margin-top: 10px;
  color: #65706d;
  font-size: 0.8rem;
}

.web-technical-details summary {
  cursor: pointer;
  font-weight: 750;
}

.web-result-pager {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 2px;
}

.web-result-pager span {
  color: #213c3a;
  font-size: 0.86rem;
  font-weight: 850;
}

.web-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.web-source {
  color: #9a5b39;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.web-location {
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 850;
}

.location-ok {
  color: #18413c;
  background: #dcebe6;
}

.location-watch {
  color: #6b4a1f;
  background: #efe6d8;
}

.web-result-actions {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 140px;
}

.web-result-actions span {
  color: #213c3a;
  font-size: 0.86rem;
  font-weight: 850;
}

.local-results-title {
  margin: 4px 0 12px;
}

.local-results-title h3 {
  font-size: 1.05rem;
}

.rejected-results {
  border-top: 1px solid #dfe6e3;
  padding-top: 12px;
}

.rejected-results summary {
  cursor: pointer;
  color: #213c3a;
  font-weight: 850;
}

.rejected-result-list {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.rejected-result-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 30%) auto;
  gap: 12px;
  align-items: start;
  padding: 11px;
  border: 1px dashed #d9cdc0;
  border-radius: 8px;
  background: #fbf7ef;
}

.rejected-result-list article div {
  display: grid;
  gap: 3px;
}

.rejected-result-list span,
.rejected-result-list small {
  color: #65706d;
  font-size: 0.78rem;
  font-weight: 800;
}

.rejected-result-list strong {
  color: #192527;
  font-size: 0.9rem;
}

.rejected-result-list p {
  margin: 0;
  color: #6a4242;
  font-size: 0.86rem;
  font-weight: 800;
}

.rejected-result-list a {
  color: #2f6862;
  font-size: 0.84rem;
  font-weight: 850;
}

.property-card {
  display: grid;
  grid-template-columns: minmax(230px, 31%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(32, 45, 44, 0.08);
}

.property-card[hidden] {
  display: none;
}

.property-media {
  position: relative;
  min-height: 280px;
  background-position: center;
  background-size: cover;
}

.source-pill,
.score-pill {
  position: absolute;
  top: 14px;
  padding: 7px 10px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(17, 26, 28, 0.76);
  font-size: 0.82rem;
  font-weight: 800;
}

.source-pill {
  left: 14px;
}

.score-pill {
  right: 14px;
}

.property-body {
  padding: 20px;
}

.property-title-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.location {
  margin: 0 0 4px;
  color: #65706d;
  font-size: 0.88rem;
  font-weight: 800;
}

.status-pill,
.match-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.status-select-wrap {
  color: #65706d;
  font-size: 0.78rem;
  font-weight: 850;
}

.status-hot {
  color: #ffffff;
  background: #b84e2f;
}

.status-watch {
  color: #2f3c2d;
  background: #d8d28b;
}

.status-shortlist {
  color: #ffffff;
  background: #2f6862;
}

.status-cool {
  color: #384042;
  background: #d8dedc;
}

.summary {
  margin: 12px 0;
  color: #4f5b5b;
  line-height: 1.48;
}

.facts,
.feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.facts span,
.feature-row span {
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.facts span {
  color: #344243;
  background: #eef1ef;
}

.decision-helper {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.decision-helper div {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border-left: 4px solid #a99574;
  border-radius: 8px;
  background: #fbf7ef;
}

.decision-helper strong {
  color: #213c3a;
  font-size: 0.86rem;
}

.decision-helper span {
  color: #4f5b5b;
  font-size: 0.9rem;
  line-height: 1.35;
}

.decision-helper.in-detail {
  margin-top: 10px;
}

.location-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  background: #f7f8f6;
}

.location-strip strong {
  color: #213c3a;
}

.location-strip span {
  color: #596261;
  font-size: 0.86rem;
  font-weight: 700;
}

.feature-row .ok {
  color: #18413c;
  background: #dcebe6;
}

.feature-row .missing {
  color: #6a4242;
  background: #f0dfdc;
}

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

.score-box {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  background: #f9faf8;
}

.score-box span,
.score-box small {
  color: #65706d;
  font-size: 0.82rem;
  font-weight: 750;
}

.score-box strong {
  color: #213c3a;
  font-size: 1.55rem;
  line-height: 1;
}

.brief-breakdown {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.criterion {
  display: grid;
  gap: 3px;
  min-height: 72px;
  padding: 9px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 850;
}

.criterion small {
  color: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
}

.criterion.ok {
  color: #18413c;
  background: #dcebe6;
}

.criterion.watch {
  color: #3d3b14;
  background: #e9e4a6;
}

.criterion.missing {
  color: #6a4242;
  background: #f0dfdc;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid #ebeeec;
}

.match-high {
  color: #ffffff;
  background: #2f6862;
}

.match-mid {
  color: #26310f;
  background: #d8d28b;
}

.match-low {
  color: #ffffff;
  background: #61706f;
}

.confidence {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.confidence span,
.source-list small {
  color: #65706d;
  font-size: 0.82rem;
}

.confidence strong {
  color: #213c3a;
  font-size: 1.45rem;
}

ul {
  margin: 7px 0 0;
  padding-left: 18px;
  color: #4f5b5b;
  font-size: 0.9rem;
}

.muted-note {
  margin: 7px 0 0;
  color: #65706d;
  font-size: 0.9rem;
}

.reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.reason-list span {
  padding: 7px 9px;
  border-radius: 8px;
  color: #6a4242;
  background: #f0dfdc;
  font-size: 0.82rem;
  font-weight: 800;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.compact {
  min-height: 36px;
  padding: 0 12px;
}

.sources-detail {
  margin-top: 14px;
  border-top: 1px solid #ebeeec;
  padding-top: 12px;
}

.sources-detail summary {
  color: #213c3a;
  cursor: pointer;
  font-weight: 850;
}

.source-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.source-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f8f6;
}

.source-list small {
  grid-column: 1 / -1;
}

.empty-state {
  padding: 22px;
  border: 1px dashed #9aa7a4;
  border-radius: 8px;
  color: #4f5b5b;
  background: #ffffff;
  font-weight: 750;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.dashboard-card {
  padding: 18px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(32, 45, 44, 0.06);
}

.dashboard-card h3 {
  margin-bottom: 12px;
}

.start-search textarea {
  margin-bottom: 12px;
}

.search-template-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.search-template-grid button,
.action-list button {
  min-height: 42px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  color: #213c3a;
  background: #f7f8f6;
  font-weight: 800;
}

.section-title-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.search-list,
.action-list {
  display: grid;
  gap: 10px;
}

.search-insights {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.search-insights span {
  padding: 11px 12px;
  border-left: 4px solid #2f6862;
  border-radius: 8px;
  color: #4f5b5b;
  background: #f7f8f6;
  font-size: 0.92rem;
  font-weight: 700;
}

.search-loading {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 50;
  width: min(720px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 104, 98, 0.2);
  border-radius: 8px;
  color: #153638;
  background: #eef6f2;
  box-shadow: 0 10px 20px rgba(32, 45, 44, 0.06);
}

.search-loading[hidden] {
  display: none;
}

.search-loading div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.search-loading span {
  color: #4f5b5b;
  font-size: 0.88rem;
  font-weight: 700;
}

.search-loading small {
  overflow: hidden;
  color: #6f7777;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-progress-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(64px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.search-progress-grid span {
  padding: 7px 8px;
  border: 1px solid rgba(47, 104, 98, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.62);
  color: #4f5b5b;
  font-size: 0.76rem;
}

.search-progress-grid strong {
  display: block;
  color: #9a5b39;
  font-size: 1rem;
}

.hourglass-loader {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(47, 104, 98, 0.22);
  border-top-color: #2f6862;
  border-radius: 999px;
  animation: search-spin 0.8s linear infinite;
}

.flash-message {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 104, 98, 0.22);
  border-radius: 8px;
  color: #153638;
  background: #eef6f2;
  font-weight: 800;
  line-height: 1.45;
}

.flash-message[data-tone="error"] {
  border-color: rgba(154, 91, 57, 0.35);
  background: #fff4ea;
}

.save-candidate-form,
.listing-pdf-form {
  display: contents;
}

.pdf-action {
  border: 1px solid rgba(47, 104, 98, 0.22);
  background: #f4eee7;
}

.web-result-card.candidate-saved {
  border-color: rgba(47, 104, 98, 0.35);
  background: #f7fbf8;
}

.secondary-action.saved,
.primary-action.saved {
  color: #ffffff;
  background: #2f6862;
}

.client-history-page {
  display: grid;
  gap: 18px;
  padding: 28px;
  width: min(100%, 1680px);
  margin: 0 auto;
}

.client-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.client-history-header h1 {
  margin-bottom: 6px;
}

.client-history-header span {
  color: #4f5b5b;
  font-weight: 700;
}

.client-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.client-profile-card {
  max-width: none;
}

.client-profile-form {
  display: grid;
  gap: 14px;
}

.client-form-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.client-form-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(28, 37, 40, 0.1);
  border-radius: 8px;
  background: #fbfaf7;
}

.client-form-section h4 {
  margin: 0;
  color: #153638;
  font-size: 1rem;
  font-weight: 850;
}

.client-form-section .field-label {
  display: block;
  margin: 4px 0 -3px;
}

.client-profile-form textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
}

.saved-property-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.saved-property-filters button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(28, 37, 40, 0.1);
  border-radius: 8px;
  color: #213c3a;
  background: #fbfaf7;
  font-weight: 800;
}

.saved-property-filters button.active {
  color: #ffffff;
  background: #213c3a;
}

.saved-property-grid {
  display: grid;
  gap: 12px;
}

.saved-property-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(28, 37, 40, 0.1);
  border-radius: 8px;
  background: #fbfaf7;
}

.saved-property-image {
  display: grid;
  place-items: center;
  min-height: 130px;
  overflow: hidden;
  border-radius: 8px;
  color: #697371;
  background: #eef1ed;
  font-weight: 800;
}

.saved-property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.saved-property-heading {
  display: grid;
  gap: 3px;
}

.saved-property-heading strong {
  color: #153638;
}

.saved-property-heading span,
.saved-property-body small {
  color: #596261;
  font-weight: 750;
}

.saved-property-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.saved-property-tags span {
  padding: 6px 8px;
  border-radius: 7px;
  background: #eef1ed;
  color: #213c3a;
  font-size: 0.78rem;
  font-weight: 850;
}

.saved-property-body p {
  margin: 0;
  color: #4f5b5b;
  font-size: 0.92rem;
}

.saved-property-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.saved-property-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.saved-property-actions select {
  min-height: 38px;
  border: 1px solid #cbd6d3;
  border-radius: 8px;
  background: #ffffff;
}

.saved-property-empty {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px dashed rgba(28, 37, 40, 0.2);
  border-radius: 8px;
  background: #fbfaf7;
}

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

.history-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(28, 37, 40, 0.1);
  border-radius: 8px;
  background: #fbfaf7;
}

.history-list article div {
  display: grid;
  gap: 4px;
}

.history-list article span,
.history-list article small {
  color: #4f5b5b;
  font-weight: 700;
}

.client-filter-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid rgba(28, 37, 40, 0.1);
  border-radius: 8px;
  background: #fbfaf7;
}

.client-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}

.client-filter-grid label {
  color: #4b5657;
  font-size: 0.82rem;
  font-weight: 800;
}

.client-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.client-filter-actions span {
  margin-left: auto;
  color: #4f5b5b;
  font-size: 0.86rem;
  font-weight: 800;
}

.client-table {
  display: grid;
  gap: 8px;
}

.client-table-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) 120px 95px 95px minmax(220px, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(28, 37, 40, 0.1);
  border-radius: 8px;
  background: #fbfaf7;
}

.client-table-detailed .client-table-row {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.9fr) minmax(210px, 1.15fr) minmax(220px, 1.25fr) minmax(150px, 0.8fr) auto;
}

.client-table-head {
  color: #4f5b5b;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.client-table-row a:first-child {
  display: grid;
  gap: 3px;
  color: #153638;
  text-decoration: none;
}

.client-table-row a:first-child span {
  color: #596261;
  font-size: 0.82rem;
  font-weight: 750;
}

.client-table-stack {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.client-table-stack strong {
  color: #153638;
  font-size: 0.9rem;
  font-weight: 850;
}

.client-table-stack small {
  overflow-wrap: anywhere;
}

.client-table-row small {
  color: #697371;
  font-weight: 700;
}

.client-table-empty {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px dashed rgba(28, 37, 40, 0.2);
  border-radius: 8px;
  background: #fbfaf7;
}

@media (max-width: 920px) {
  .client-form-sections {
    grid-template-columns: 1fr;
  }

  .header-view-tabs {
    order: 3;
    width: 100%;
    margin: 8px 0 0;
    overflow-x: auto;
  }
  .client-history-grid,
  .client-kpis {
    grid-template-columns: 1fr;
  }

  .client-history-header {
    flex-direction: column;
  }

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

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

  .client-table-head {
    display: none;
  }

  .client-table-row {
    grid-template-columns: 1fr;
  }

  .client-table-detailed .client-table-row {
    grid-template-columns: 1fr;
  }

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

  .client-filter-actions span {
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .client-filter-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes search-spin {
  to {
    transform: rotate(360deg);
  }
}

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

.source-suggestion-grid a {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 12px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  color: #213c3a;
  background: #fbf7ef;
  text-decoration: none;
}

.source-suggestion-grid span {
  color: #596261;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
}

.search-list article,
.action-list button {
  display: grid;
  gap: 3px;
  padding: 12px;
  text-align: left;
}

.search-list article {
  border-radius: 8px;
  background: #f7f8f6;
}

.search-list strong,
.action-list strong {
  color: #213c3a;
}

.search-list span,
.action-list span,
.search-list small {
  color: #596261;
  font-size: 0.9rem;
}

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

.dashboard-metrics div {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 14px;
  border-radius: 8px;
  background: #fbf7ef;
}

.dashboard-metrics strong {
  color: #9a5b39;
  font-size: 1.65rem;
  line-height: 1;
}

.dashboard-metrics span {
  color: #596261;
  font-size: 0.86rem;
  font-weight: 800;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.map-toolbar button {
  min-height: 36px;
  border: 1px solid #dfe6e3;
  border-radius: 8px;
  color: #4f5b5b;
  background: #ffffff;
  font-weight: 800;
}

.map-toolbar .active {
  color: #ffffff;
  background: #213c3a;
}

.decision-map {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) 340px;
  gap: 18px;
}

.map-visual {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 65% 22%, rgba(255, 255, 255, 0.9) 0 5%, transparent 6%),
    linear-gradient(135deg, transparent 0 48%, rgba(50, 93, 130, 0.12) 49% 52%, transparent 53%),
    linear-gradient(110deg, rgba(47, 104, 98, 0.08), rgba(154, 91, 57, 0.1)),
    #eef1ef;
}

.ring {
  position: absolute;
  left: 50%;
  top: 52%;
  display: grid;
  place-items: start center;
  border: 1px dashed rgba(33, 60, 58, 0.42);
  border-radius: 50%;
  color: #213c3a;
  font-size: 0.82rem;
  font-weight: 850;
  transform: translate(-50%, -50%);
}

.ring-15 {
  width: 150px;
  height: 150px;
  padding-top: 14px;
}

.ring-30 {
  width: 300px;
  height: 300px;
  padding-top: 22px;
}

.ring-45 {
  width: 450px;
  height: 450px;
  padding-top: 30px;
}

.city-marker,
.map-pin {
  position: absolute;
  border-radius: 8px;
  font-weight: 850;
}

.city-marker {
  left: 50%;
  top: 52%;
  padding: 9px 12px;
  color: #ffffff;
  background: #213c3a;
  transform: translate(-50%, -50%);
}

.map-pin {
  z-index: 4;
  padding: 8px 10px;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 20px rgba(32, 45, 44, 0.18);
}

.map-pin span {
  margin-right: 4px;
  color: #ffe7a1;
}

.map-pin.active {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(32, 45, 44, 0.26);
}

.loc-confirmed {
  background: #2f6862;
}

.loc-probable {
  background: #bd713f;
}

.loc-unknown {
  background: #b84e2f;
}

.uncertainty-zone {
  position: absolute;
  z-index: 1;
  border: 2px dashed currentColor;
  border-radius: 50%;
  opacity: 0.24;
  transform: translate(-50%, -50%);
}

.uncertainty-zone.loc-confirmed {
  color: #2f6862;
  background: rgba(47, 104, 98, 0.14);
}

.uncertainty-zone.loc-probable {
  color: #bd713f;
  background: rgba(189, 113, 63, 0.15);
}

.uncertainty-zone.loc-unknown {
  color: #b84e2f;
  background: rgba(184, 78, 47, 0.13);
}

.pin-mougins-belvedere {
  left: 42%;
  top: 36%;
}

.zone-mougins-belvedere {
  left: 46%;
  top: 39%;
  width: 145px;
  height: 145px;
}

.pin-super-cannes-corniche {
  left: 58%;
  top: 34%;
}

.zone-super-cannes-corniche {
  left: 62%;
  top: 37%;
  width: 190px;
  height: 190px;
}

.pin-theoule-californienne {
  left: 31%;
  top: 72%;
}

.zone-theoule-californienne {
  left: 35%;
  top: 75%;
  width: 95px;
  height: 95px;
}

.pin-valbonne-mas {
  left: 62%;
  top: 19%;
}

.zone-valbonne-mas {
  left: 66%;
  top: 22%;
  width: 280px;
  height: 280px;
}

.map-popover {
  position: absolute;
  z-index: 5;
  display: none;
  width: min(285px, calc(100% - 28px));
  max-height: 360px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 38px rgba(32, 45, 44, 0.18);
}

.map-popover.active {
  display: grid;
  gap: 7px;
}

.map-popover.pinned {
  outline: 3px solid rgba(47, 104, 98, 0.18);
}

.map-popover-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.map-popover-head div {
  display: flex;
  gap: 6px;
  align-items: center;
}

.map-popover-head strong {
  line-height: 1.16;
}

.map-popover-head span {
  color: #65706d;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.popover-close {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #213c3a;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1;
}

.map-popover p {
  margin: 0;
  color: #4f5b5b;
  font-size: 0.8rem;
}

.mini-facts,
.mini-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-facts span,
.mini-scores span {
  padding: 5px 7px;
  border-radius: 8px;
  color: #344243;
  background: #eef1ef;
  font-size: 0.72rem;
  font-weight: 800;
}

.mini-scores strong {
  color: #213c3a;
}

.address-confirm-card {
  display: grid;
  gap: 6px;
  padding-top: 2px;
}

.address-confirm-card label {
  color: #4b5657;
  font-size: 0.72rem;
  font-weight: 800;
}

.address-confirm-card .card-actions {
  margin-top: 4px;
}

.address-confirm-card .compact,
.address-confirm-card .secondary-link {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.saved-address {
  margin: 0;
  padding: 7px 8px;
  border-radius: 8px;
  color: #18413c;
  background: #dcebe6;
  font-size: 0.74rem;
  font-weight: 800;
}

[data-map-card="mougins-belvedere"] {
  left: 39%;
  top: 45%;
}

[data-map-card="super-cannes-corniche"] {
  left: 39%;
  top: 34%;
}

[data-map-card="theoule-californienne"] {
  left: 26%;
  bottom: 7%;
}

[data-map-card="valbonne-mas"] {
  right: 7%;
  top: 28%;
}

.map-decision-panel,
.import-panel {
  padding: 20px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.map-legend,
.map-note-list,
.localization-card {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.map-legend span,
.map-note-list span,
.localization-card span {
  color: #596261;
  font-size: 0.9rem;
  font-weight: 700;
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: -1px;
}

.legend-star {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  border-radius: 50%;
  color: #ffffff;
  background: #213c3a;
  font-size: 0.8rem;
  font-style: normal;
}

.map-selected-card,
.map-note-list,
.localization-card {
  padding: 13px;
  border-radius: 8px;
  background: #f7f8f6;
}

.map-selected-card {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.map-selected-card strong,
.map-note-list strong,
.localization-card strong {
  color: #213c3a;
}

.map-selected-card span {
  color: #596261;
  font-size: 0.9rem;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: #213c3a;
  background: #e7ddd2;
  font-weight: 800;
  text-decoration: none;
}

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

.travel-grid div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: #fbf7ef;
}

.travel-grid strong {
  color: #9a5b39;
  font-size: 1.1rem;
}

.travel-grid span {
  color: #596261;
  font-size: 0.86rem;
  font-weight: 700;
}

.compare-wrap {
  overflow-x: auto;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.compare-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 12px;
  border-bottom: 1px solid #ebeeec;
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  color: #213c3a;
  background: #f7f8f6;
  font-size: 0.82rem;
  font-weight: 850;
}

.compare-table td {
  color: #4f5b5b;
  font-size: 0.9rem;
}

.compare-table td span {
  display: block;
  color: #65706d;
  font-size: 0.82rem;
}

.import-panel {
  display: grid;
  gap: 14px;
  max-width: 820px;
}

.import-workspace {
  display: grid;
  grid-template-columns: minmax(420px, 820px) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

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

.import-client-grid label {
  display: grid;
  gap: 5px;
  color: #213c3a;
  font-size: 0.82rem;
  font-weight: 850;
}

.import-help-panel,
.import-results {
  padding: 18px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.import-help-panel ul {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: #4f5b5b;
  font-weight: 650;
}

.browser-capture-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(47, 118, 108, 0.22);
  border-radius: 8px;
  background: #f3faf7;
}

.browser-capture-box h3 {
  margin: 0;
}

.browser-capture-box p:last-child {
  margin: 0;
  color: #4f5b5b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.import-preview {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 8px;
  color: #4f5b5b;
  background: #f7f8f6;
}

.import-results {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

.import-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.import-summary-actions form {
  margin: 0;
}

.danger-action {
  color: #8a352d;
  background: #f2ded4;
}

.danger-action:hover {
  color: #ffffff;
  background: #8a352d;
}

.import-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.import-kpis span {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f8f6;
  color: #4f5b5b;
  font-weight: 750;
}

.import-kpis strong {
  color: #9a5b39;
  font-size: 1.25rem;
}

.import-result-list {
  display: grid;
  gap: 12px;
}

.import-result-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 150px;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #fcfdfb;
}

.import-result-card > img,
.import-result-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: #edf1ee;
}

.import-result-card > img {
  object-fit: cover;
}

.import-result-placeholder {
  display: grid;
  place-items: center;
  color: #697371;
  font-size: 0.84rem;
  font-weight: 850;
  text-align: center;
}

.import-result-body {
  display: grid;
  gap: 8px;
}

.import-result-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.import-result-heading small,
.import-note {
  color: #596261;
  font-weight: 750;
}

.import-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  color: #213c3a;
  background: #edf1ee;
  font-size: 0.78rem;
  font-weight: 900;
}

.import-status.ok {
  background: #dbeee9;
}

.import-status.watch {
  background: #f6ead8;
}

.import-status.error {
  background: #f7ded9;
}

.import-result-actions {
  display: grid;
  gap: 8px;
}

.detail-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #1c2528;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(17, 26, 28, 0.28);
}

.detail-dialog::backdrop {
  background: rgba(17, 26, 28, 0.48);
}

.detail-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #ebeeec;
}

.detail-header h2 {
  margin-bottom: 4px;
}

.detail-header span {
  color: #65706d;
  font-weight: 700;
}

.icon-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: #213c3a;
  font-weight: 850;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  padding: 20px;
}

.detail-gallery img {
  width: 100%;
  height: 210px;
  border-radius: 8px;
  object-fit: cover;
}

.detail-gallery img:first-child {
  height: 428px;
  grid-row: span 2;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 0 20px 20px;
}

.detail-grid section {
  padding: 16px;
  border: 1px solid #ebeeec;
  border-radius: 8px;
  background: #ffffff;
}

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

.advanced-summary div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #f7f8f6;
}

.advanced-summary strong {
  color: #213c3a;
  font-size: 0.82rem;
}

.advanced-summary span {
  color: #596261;
  font-size: 0.9rem;
}

.history-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  display: grid;
  gap: 2px;
  padding-left: 12px;
  border-left: 3px solid #a99574;
}

.history-list span,
.contact-box span {
  color: #596261;
}

.contact-box {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #fbf7ef;
}

.legal-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 46px 24px;
}

.legal-page h1 {
  max-width: 720px;
}

.legal-page p {
  max-width: 760px;
  color: #4f5b5b;
  line-height: 1.6;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.legal-grid article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
}

.legal-grid span {
  color: #596261;
}

.footer {
  padding: 16px 0;
  border-top: 1px solid rgba(28, 37, 40, 0.1);
  background: #ffffff;
}

.document-editor-page {
  min-height: calc(100vh - 64px);
  padding: 30px;
  background: #f4f1ec;
}

.document-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin: 0 auto 18px;
  max-width: 1240px;
}

.document-editor-heading h1 {
  margin: 0;
  color: #0f3133;
  font-size: 30px;
}

.document-editor-heading span,
.document-editor-alert {
  color: #526162;
}

.document-editor-alert {
  max-width: 1240px;
  margin: 0 auto 18px;
  padding: 12px 14px;
  border: 1px solid #d8c6ae;
  border-radius: 8px;
  background: #fff8eb;
  font-weight: 700;
}

.document-editor-form {
  max-width: 1240px;
  margin: 0 auto;
}

.document-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.document-paper-preview,
.document-details-editor {
  border: 1px solid rgba(28, 37, 40, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(26, 32, 32, 0.07);
}

.document-paper-preview {
  padding: 28px;
}

.document-details-editor {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
  padding: 20px;
}

.document-field {
  display: grid;
  gap: 7px;
  color: #152f31;
  font-weight: 800;
}

.document-field span {
  font-size: 13px;
}

.document-field input,
.document-field textarea {
  width: 100%;
  border: 1px solid #c8d2cf;
  border-radius: 7px;
  background: #fbfcfb;
  color: #173334;
  font: inherit;
  font-weight: 500;
}

.document-field input {
  min-height: 40px;
  padding: 9px 11px;
}

.document-field textarea {
  min-height: 260px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

.document-title-field {
  margin-bottom: 18px;
}

.document-photo-stage {
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 4px;
  background: #eef2ef;
  aspect-ratio: 16 / 9;
}

.document-photo-stage img,
.document-photo-choice img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.document-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.document-photo-choice {
  display: grid;
  gap: 7px;
  color: #203c3d;
  font-size: 12px;
  font-weight: 800;
}

.document-photo-choice img {
  height: 105px;
  border-radius: 4px;
}

.document-photo-choice span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.document-empty-photo {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-bottom: 20px;
  border: 1px dashed #aab8b6;
  border-radius: 8px;
  background: #f7f9f7;
  color: #566463;
  font-weight: 800;
}

.document-description-field {
  margin-top: 4px;
}

.document-editor-actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.document-editor-actions .primary-action,
.document-editor-actions .secondary-action {
  justify-content: center;
  width: 100%;
  border: 0;
}

@media (max-width: 1080px) {
  .workspace,
  .property-card,
  .web-result-card,
  .dashboard-grid,
  .decision-map,
  .detail-grid,
  .document-editor-grid {
    grid-template-columns: 1fr;
  }

  .document-details-editor {
    position: static;
  }

  .search-panel {
    position: static;
    min-height: auto;
    max-height: none;
    overflow: visible;
    scrollbar-gutter: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(28, 37, 40, 0.1);
  }

  .property-media {
    min-height: 310px;
  }
}

@media (max-width: 760px) {
  .search-panel,
  .results-area {
    padding: 20px;
  }

  .navbar-status {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .results-header,
  .property-title-row,
  .ranked-results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-tabs,
  .quick-actions,
  .filter-grid,
  .search-template-grid,
  .source-suggestion-grid,
  .dashboard-metrics,
  .kpi-row,
  .score-grid,
  .brief-breakdown,
  .advanced-summary,
  .evidence-grid,
  .legal-grid,
  .detail-gallery {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .view-tabs {
    display: grid;
  }

  .property-media {
    min-height: 230px;
  }

  .map-visual {
    min-height: 520px;
  }

  .ring-45 {
    width: 340px;
    height: 340px;
  }

  .location-strip,
  .travel-grid {
    grid-template-columns: 1fr;
  }

  .detail-gallery img,
  .detail-gallery img:first-child {
    height: 220px;
    grid-row: auto;
  }

  .document-editor-page {
    padding: 18px;
  }

  .document-editor-heading {
    flex-direction: column;
  }

  .document-paper-preview {
    padding: 18px;
  }

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