html,
body,
#app {
  height: 100%;
  margin: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #182026;
  background: #f4f6f8;
}

#app {
  display: grid;
  grid-template-columns: minmax(320px, 380px) 1fr;
}

#map {
  min-height: 100%;
}

.panel {
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: #ffffff;
  border-right: 1px solid #d8dee5;
  box-shadow: 0 10px 24px rgba(18, 30, 42, 0.08);
  overflow: auto;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.brand p {
  margin: 6px 0 0;
  color: #607080;
  font-size: 13px;
  line-height: 1.4;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  grid-column: span 2;
}

.field.compact {
  grid-column: span 1;
}

label,
.points span {
  color: #52616f;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd4dd;
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  background: #ffffff;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: span 2;
  color: #26323d;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.check-field input {
  width: auto;
}

.buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  grid-column: span 2;
}

.export-buttons {
  grid-template-columns: 1fr 1fr 1fr;
}

.export-buttons button {
  border-color: #c2cbd4;
  background: #ffffff;
  color: #26323d;
  font-size: 13px;
  padding: 8px 10px;
}

button {
  border: 1px solid #193b57;
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  background: #1f5b7a;
  color: #ffffff;
  cursor: pointer;
}

button:disabled {
  border-color: #b8c3cc;
  background: #dce3e9;
  color: #758391;
  cursor: default;
}

#clearBtn {
  border-color: #c2cbd4;
  background: #ffffff;
  color: #26323d;
}

.points,
.progress,
.summary {
  display: grid;
  gap: 10px;
}

.points div,
.summary div {
  border: 1px solid #dbe2e8;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafb;
}

.points strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.summary {
  font-size: 13px;
}

.progress {
  border: 1px solid #dbe2e8;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafb;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #52616f;
  font-size: 13px;
}

.progress-row strong {
  color: #26323d;
  white-space: nowrap;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe3ea;
}

#progressBar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #1f5b7a;
  transition: width 0.25s ease;
}

#progressBar.active {
  background: linear-gradient(90deg, #1f5b7a, #43936c);
}

.summary strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.summary .alternative {
  border-left: 4px solid #1f5b7a;
}

.summary .alternative.primary {
  border-left-color: #d22f27;
}

.leaflet-container {
  font: inherit;
}

@media (max-width: 760px) {
  #app {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .panel {
    max-height: 42vh;
    border-right: 0;
    border-bottom: 1px solid #d8dee5;
  }

  #map {
    min-height: 58vh;
  }
}
