@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --main-primary: #08aee0;
  --main-secondary: #eea40f;
  --main-tertiary: #9fa5ab;
  --main-error: #f53535;
  --main-surface-neutral: #f6f9fc;
  --main-surface-neutral-variant: #ffffff;
  --opensolar-yellow: #ffd800;
  --text-primary: #1d1c20;
  --text-label: #13171a;
  --text-muted: #6b6a76;
  --grey-200: #f8f8f8;
  --grey-300: #f1f1f1;
  --grey-400: #ececed;
  --grey-500: #e6e6e6;
  --grey-600: #dcdcdc;
  --brand-blue-900: #1751d0;
  --grey-1000: #4c4b53;
  --btn-primary: #4272dd;
  --airbnb-rausch: #ff385c;

  --color-bg-page: var(--main-surface-neutral);
  --color-surface: var(--main-surface-neutral-variant);
  --color-border: var(--grey-600);
  --color-border-light: var(--grey-400);
  --color-text: var(--text-primary);
  --color-text-muted: var(--text-muted);
  --color-accent: var(--main-primary);
  --color-nav-active: var(--text-label);
  --color-sidebar-active: var(--brand-blue-900);

  --header-h: 56px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.05px;
  color: var(--color-text);
  background: var(--color-bg-page);
  min-height: 100%;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1728px;
  margin: 0 auto;
}

/* Top nav */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0 24px;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-surface);
  flex-shrink: 0;
}

.top-nav__left {
  display: flex;
  align-items: center;
  gap: 40px;
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--airbnb-rausch);
}

.brand-lockup__logo {
  display: block;
  width: 30px;
  height: 28px;
  flex-shrink: 0;
}

.brand-lockup__wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: var(--airbnb-rausch);
  line-height: 1;
}

.main-tabs {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  height: var(--header-h);
}

.main-tabs a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
}

.main-tabs a:hover {
  color: var(--color-text);
}

.main-tabs a.is-active {
  color: var(--airbnb-rausch);
  font-weight: 700;
}

.main-tabs a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--airbnb-rausch);
}

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

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--text-label);
  cursor: pointer;
}

.btn-icon:hover {
  background: var(--grey-200);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.user-chip__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--brand-blue-900);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

.user-chip__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-label);
}

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  margin: 16px 24px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(10, 9, 11, 0.04);
  overflow: hidden;
  padding-right: 8px;
}

.search-bar__field {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-bar__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.search-bar__field input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-label);
  padding: 0;
  outline: none;
  width: 100%;
}

.search-bar__divider {
  width: 1px;
  height: 32px;
  background: var(--color-border-light);
  flex-shrink: 0;
}

.search-bar__submit {
  flex-shrink: 0;
  align-self: center;
  border-radius: var(--radius-sm);
  padding: 0 24px;
  white-space: nowrap;
}

/* Main */
.main {
  flex: 1;
  padding: 24px;
  min-width: 0;
}

.breadcrumb {
  font-size: 12px;
  line-height: 16px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb span {
  margin: 0 4px;
}

.breadcrumb strong {
  color: var(--text-label);
  font-weight: 500;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}

.page-head__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.page-head__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  color: var(--text-label);
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  background: var(--grey-300);
  color: var(--grey-1000);
}

.status-badge--live {
  background: rgba(8, 174, 224, 0.12);
  color: var(--brand-blue-900);
}

.status-badge--live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--main-primary);
  margin-right: 6px;
}

/* Buttons */
.btn-save {
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--btn-primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-save:hover {
  filter: brightness(1.04);
}

.btn-save--sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-preview {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--text-label);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-preview:hover {
  background: var(--grey-200);
}

/* KPI strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.kpi-card__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-card__value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-label);
  letter-spacing: -0.02em;
}

.kpi-card__delta {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-card__delta--up {
  color: var(--brand-blue-900);
}

/* Content layout */
.content-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.content-layout.is-map-open {
  grid-template-columns: 280px 1fr 380px;
}

/* Filters */
.filters-panel {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: 16px;
  position: sticky;
  top: 16px;
}

.filters-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.filters-panel__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-label);
}

.filters-panel__clear {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-blue-900);
  cursor: pointer;
  text-decoration: underline;
}

.filter-group {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-label);
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
}

.filter-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--btn-primary);
}

.price-range__slider {
  width: 100%;
  accent-color: var(--btn-primary);
}

.price-range__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: var(--color-text);
}

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

.stepper button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-label);
}

.stepper button:hover {
  background: var(--grey-200);
}

.stepper span {
  min-width: 32px;
  text-align: center;
  font-weight: 500;
}

/* Results */
.results-panel {
  min-width: 0;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}

.filter-chip:hover {
  border-color: var(--grey-600);
}

.filter-chip.is-active {
  border-color: var(--brand-blue-900);
  background: rgba(23, 81, 208, 0.06);
  color: var(--brand-blue-900);
}

.results-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Listing cards — corporate data-dense style */
.listing-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.listing-card:hover {
  border-color: var(--color-border);
  box-shadow: 0 4px 16px rgba(10, 9, 11, 0.06);
}

.listing-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--grey-300);
}

.listing-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-label);
  border: 1px solid var(--color-border-light);
}

.listing-card__badge--new {
  background: rgba(8, 174, 224, 0.12);
  border-color: transparent;
  color: var(--brand-blue-900);
}

.listing-card__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  flex: 1;
}

.listing-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.listing-card__type {
  font-size: 12px;
  color: var(--text-muted);
}

.listing-card__rating {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-label);
  white-space: nowrap;
}

.listing-card__rating em {
  font-style: normal;
  font-weight: 400;
  color: var(--text-muted);
}

.listing-card__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--text-label);
}

.listing-card__details {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.listing-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.metric-pill {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--grey-200);
  font-size: 11px;
  font-weight: 500;
  color: var(--grey-1000);
}

.metric-pill--accent {
  background: rgba(23, 81, 208, 0.08);
  color: var(--brand-blue-900);
}

.listing-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--color-border-light);
}

.listing-card__price {
  font-size: 13px;
  color: var(--text-muted);
}

.listing-card__price strong {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-label);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}

.pagination__btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-label);
  cursor: pointer;
}

.pagination__btn:hover:not(:disabled) {
  background: var(--grey-200);
}

.pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination__page {
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
}

.pagination__page:hover {
  background: var(--grey-200);
}

.pagination__page.is-active {
  border-color: var(--brand-blue-900);
  background: rgba(23, 81, 208, 0.06);
  color: var(--brand-blue-900);
  font-weight: 600;
}

.pagination__ellipsis {
  padding: 0 4px;
  color: var(--text-muted);
}

/* Map panel */
.map-panel {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
  position: sticky;
  top: 16px;
  height: calc(100vh - 280px);
  min-height: 400px;
}

.map-panel[hidden] {
  display: none;
}

.map-panel__placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: linear-gradient(135deg, #e8eef5 0%, #d4dce8 50%, #c8d4e4 100%);
  color: var(--text-muted);
  text-align: center;
  padding: 24px;
}

.map-panel__placeholder svg {
  color: var(--brand-blue-900);
  opacity: 0.5;
  margin-bottom: 12px;
}

.map-panel__placeholder p {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-label);
}

.map-panel__placeholder span {
  font-size: 12px;
}

.map-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-label);
  box-shadow: 0 2px 8px rgba(10, 9, 11, 0.1);
}

/* Responsive */
@media (max-width: 1200px) {
  .content-layout.is-map-open {
    grid-template-columns: 260px 1fr;
  }

  .map-panel {
    grid-column: 1 / -1;
    height: 320px;
    position: static;
  }
}

@media (max-width: 960px) {
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-layout,
  .content-layout.is-map-open {
    grid-template-columns: 1fr;
  }

  .filters-panel {
    position: static;
  }

  .main-tabs {
    display: none;
  }

  .search-bar {
    flex-wrap: wrap;
  }

  .search-bar__field {
    flex: 1 1 45%;
  }

  .search-bar__divider:nth-child(4),
  .search-bar__divider:nth-child(6) {
    display: none;
  }

  .search-bar__submit {
    flex: 1 1 100%;
    height: 44px;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 16px;
  }

  .search-bar {
    margin: 12px 16px 0;
  }

  .top-nav {
    padding: 0 16px;
  }

  .user-chip__name {
    display: none;
  }

  .kpi-strip {
    grid-template-columns: 1fr;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head__actions {
    justify-content: flex-end;
  }
}
