:root {
  --page-bg: #082949;
  --navy-950: #061e37;
  --navy-900: #082744;
  --navy-850: #0b3156;
  --navy-800: #0e3a63;
  --navy-700: #114d7f;
  --gold: #f2a93b;
  --gold-strong: #f59f1a;
  --text: #172236;
  --muted: #6d7889;
  --line: rgba(10, 33, 60, 0.12);
  --white: #ffffff;
  --panel: rgba(255, 255, 255, 0.96);
  --shadow: 0 22px 60px rgba(3, 21, 43, 0.24);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(48, 121, 181, 0.42), transparent 30%),
    linear-gradient(140deg, #061f39 0%, #0a3154 44%, #0b4772 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(9, 31, 57, 0.08);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #15304f;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 0 24%, transparent 25%),
    repeating-conic-gradient(from 0deg, var(--gold) 0deg 9deg, transparent 9deg 18deg);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(242, 169, 59, 0.18);
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 17px;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 76px;
  color: #1d304c;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.main-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 18px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.main-nav a.is-active::after,
.main-nav a:hover::after {
  background: var(--gold);
}

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

.header-search,
.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 43, 76, 0.14);
  background: #fff;
  color: #1f334f;
}

.header-search {
  gap: 10px;
  min-width: 148px;
  height: 38px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.menu-button {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 18px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(255px, 315px) minmax(460px, 1fr) minmax(285px, 330px);
  gap: 16px;
  height: calc(100vh - 76px);
  min-height: 660px;
  overflow: hidden;
  padding: 18px;
}

.hero-panel,
.map-panel,
.side-panel {
  height: 100%;
  min-width: 0;
}

.hero-panel {
  position: relative;
  display: grid;
  align-content: end;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(7, 30, 55, 0.04), rgba(7, 30, 55, 0.88)),
    linear-gradient(145deg, #0b3158 0%, #061d34 74%);
  box-shadow: var(--shadow);
  color: #fff;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 25, 46, 0) 0%, rgba(6, 25, 46, 0.18) 34%, rgba(6, 25, 46, 0.82) 56%, rgba(6, 25, 46, 0.96) 100%),
    linear-gradient(90deg, rgba(6, 25, 46, 0.12), rgba(6, 25, 46, 0.52));
}

.hero-portrait {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 255px;
  object-fit: cover;
  object-position: center top;
}

.flag-shape {
  position: absolute;
  top: -28px;
  left: -85px;
  width: 275px;
  height: 190px;
  border-radius: 45% 55% 58% 42%;
  background: linear-gradient(135deg, rgba(218, 35, 44, 0.92), rgba(151, 11, 20, 0.56));
  filter: blur(0.2px);
  opacity: 0;
  transform: rotate(-13deg);
}

.flag-shape::before {
  content: "";
  position: absolute;
  top: 62px;
  left: 132px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  box-shadow: -10px 0 0 7px rgba(255, 255, 255, 0.88);
}

.flag-shape::after {
  content: "";
  position: absolute;
  top: 77px;
  left: 186px;
  width: 0;
  height: 0;
  border-right: 22px solid transparent;
  border-bottom: 15px solid rgba(255, 255, 255, 0.9);
  border-left: 22px solid transparent;
  transform: rotate(18deg);
}

.portrait-light {
  position: absolute;
  right: -80px;
  bottom: 170px;
  width: 270px;
  height: 300px;
  border-radius: 46% 46% 0 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 58%, transparent 59%);
  opacity: 0.7;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 145px 24px 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(3, 18, 35, 0.5);
}

.hero-content h1 {
  margin: 0;
  color: #fff;
  max-width: 270px;
  font-size: clamp(36px, 3.65vw, 50px);
  line-height: 0.95;
}

.hero-content h1 span {
  display: block;
  color: var(--gold);
}

.hero-lead {
  max-width: 260px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  line-height: 1.35;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 18px;
}

.hero-stats article {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.hero-stats i {
  color: var(--gold);
  font-size: 17px;
}

.hero-stats small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-stats strong {
  color: #fff;
  font-size: 17px;
}

.feature-cards {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.feature-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: left;
}

.feature-card i {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(242, 169, 59, 0.16);
  color: var(--gold);
}

.feature-card span {
  align-self: end;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.feature-card small {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-card:hover,
.feature-card.is-active {
  background: rgba(242, 169, 59, 0.2);
}

.map-panel {
  display: grid;
  grid-template-rows: auto minmax(430px, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.map-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 230px) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(6, 28, 52, 0.58);
  backdrop-filter: blur(12px);
}

.search-field,
.select-field,
.side-select-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(7, 34, 62, 0.82);
  color: #fff;
}

.search-field {
  gap: 10px;
  height: 42px;
  padding: 0 14px;
  border-radius: 9px;
}

.search-field i {
  color: rgba(255, 255, 255, 0.68);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
}

.search-field input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.select-field {
  position: relative;
  height: 42px;
  border-radius: 9px;
}

.select-field span {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
}

.select-field select,
.side-select-wrap select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  appearance: none;
}

.select-field select {
  height: 100%;
  padding: 0 36px 0 14px;
}

.select-field::after,
.side-select-wrap::after {
  content: "\f078";
  position: absolute;
  right: 13px;
  color: currentColor;
  font-family: "Font Awesome 5 Free";
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

.select-field option,
.side-select-wrap option {
  color: #18253a;
}

.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 9px;
  background: rgba(7, 34, 62, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.map-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  border-radius: 12px;
  background: #d7e1e7;
  box-shadow: var(--shadow);
}

#map {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #d7e1e7;
}

.map-empty {
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 450;
  display: grid;
  gap: 4px;
  width: min(360px, calc(100% - 28px));
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(8, 28, 52, 0.18);
  color: #18314f;
  text-align: center;
  transform: translateX(-50%);
}

.map-empty span {
  color: var(--muted);
  font-size: 13px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.category-pill {
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 70px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #253956;
}

.category-pill i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cat-color) 14%, white);
  color: var(--cat-color);
}

.category-pill span {
  overflow: hidden;
  max-width: 100%;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-pill small {
  color: var(--muted);
  font-size: 11px;
}

.category-pill:hover,
.category-pill.is-active {
  border-color: color-mix(in srgb, var(--cat-color) 40%, transparent);
  background: color-mix(in srgb, var(--cat-color) 12%, white);
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  padding: 14px;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.side-section {
  min-width: 0;
}

.side-label {
  display: inline-flex;
  margin-bottom: 7px;
  color: #1c304c;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-select-wrap {
  position: relative;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  color: #243957;
}

.side-select-wrap i {
  color: #3d6d9d;
}

.side-select-wrap select {
  height: 100%;
  padding-right: 28px;
}

.side-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.side-summary div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f9fc;
}

.side-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.side-summary strong {
  overflow: hidden;
  color: #1d70c7;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.section-heading h2 {
  margin: 0;
  color: #1b304c;
  font-size: 13px;
  text-transform: uppercase;
}

.distribution-list {
  display: grid;
  gap: 7px;
}

.distribution-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 9px;
}

.distribution-row i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cat-color) 16%, white);
  color: var(--cat-color);
  font-size: 11px;
}

.distribution-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.distribution-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #273a56;
  font-size: 12px;
  font-weight: 800;
}

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

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--cat-color);
}

.distribution-count {
  color: #213955;
  font-size: 12px;
  font-weight: 900;
}

.investments-section {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.investment-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  min-height: 0;
  padding-right: 3px;
}

.investment-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.investment-card:hover {
  box-shadow: 0 10px 28px rgba(11, 37, 65, 0.12);
}

.investment-thumb {
  position: relative;
  overflow: hidden;
  min-height: 68px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dce6ee, #f4f7fa);
}

.investment-thumb img {
  width: 100%;
  height: 100%;
  min-height: 68px;
  object-fit: cover;
}

.investment-thumb.is-empty {
  display: grid;
  place-items: center;
  color: #7890a7;
}

.investment-body {
  min-width: 0;
  padding: 7px 8px 7px 0;
}

.investment-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-bottom: 4px;
  color: var(--cat-color);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.investment-body h3 {
  overflow: hidden;
  display: -webkit-box;
  margin: 0;
  color: #182f4c;
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.investment-body p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  background: #f4f7fb;
  color: #1b4f83;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.view-all:hover {
  background: #e8f0f8;
}

.investment-pin {
  background: transparent;
  border: 0;
}

.investment-pin span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--pin-color);
  box-shadow: 0 8px 18px rgba(4, 21, 39, 0.28);
  color: #fff;
  font-size: 14px;
}

.cluster-pin {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2479cf;
  box-shadow: 0 10px 20px rgba(4, 21, 39, 0.28);
  color: #fff;
  font-weight: 900;
}

.leaflet-popup-content-wrapper {
  overflow: hidden;
  border-radius: 12px;
}

.leaflet-popup-content {
  width: 285px !important;
  margin: 0;
}

.popup-card {
  display: grid;
  gap: 10px;
}

.popup-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #edf2f6;
}

.popup-body {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.popup-body strong {
  color: #172c47;
  font-size: 15px;
  line-height: 1.3;
}

.popup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #5e6f82;
  font-size: 12px;
}

.popup-category {
  display: inline-flex;
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cat-color) 13%, white);
  color: var(--cat-color);
  font-size: 11px;
  font-weight: 900;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1360px) {
  .dashboard-shell {
    grid-template-columns: minmax(230px, 285px) minmax(420px, 1fr) minmax(270px, 300px);
  }

  .main-nav {
    gap: 20px;
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .main-nav {
    display: none;
  }

  .header-actions {
    justify-content: end;
  }

  .dashboard-shell {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  }

  .side-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }

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

@media (max-width: 860px) {
  .site-header {
    gap: 12px;
    min-height: 68px;
    padding: 0 14px;
  }

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

  .brand-copy small,
  .header-search {
    display: none;
  }

  .dashboard-shell {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 12px;
  }

  .hero-panel,
  .map-panel,
  .side-panel {
    min-height: 0;
    margin-bottom: 12px;
  }

  .hero-panel {
    min-height: 520px;
  }

  .map-panel {
    display: grid;
    grid-template-rows: auto 540px auto;
  }

  .map-toolbar {
    grid-template-columns: 1fr;
  }

  .category-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  .dashboard-shell {
    padding: 8px;
  }

  .hero-content {
    padding: 26px 22px 20px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .feature-card {
    grid-template-columns: 34px 1fr;
    padding: 12px;
  }

  .feature-card i {
    width: 34px;
    height: 34px;
  }

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

  .side-summary {
    grid-template-columns: 1fr;
  }
}
