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

body {
  color: #17201d;
  background: #f3f0ea;
  font-family: "Segoe UI", Arial, sans-serif;
}

main {
  min-height: 100vh;
}

#form1 {
  min-height: 100vh;
}

.map-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.map-panel {
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  background: #f9f7f1;
  border-right: 1px solid #d9d3c7;
  box-shadow: 10px 0 28px rgb(54 45 33 / 12%);
}

.brand-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #277a6e 0 50%, transparent 50%),
    linear-gradient(315deg, #d88b2d 0 50%, #f2d28a 50%);
  border: 1px solid #bcb19e;
}

h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

#serverClock {
  display: block;
  margin-top: 4px;
  color: #65716b;
  font-size: 13px;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #7a6d5a;
  font-size: 12px;
  font-weight: 700;
}

.state-pill.ready {
  background: #277a6e;
}

.state-pill.missing {
  background: #a3532c;
}

.field-label {
  margin: 0 0 -10px;
  color: #65716b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.layer-select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: #17201d;
  background: #ffffff;
  border: 1px solid #c9c0b2;
  border-radius: 6px;
  font-weight: 600;
}

.layer-select:focus {
  outline: 3px solid rgb(39 122 110 / 24%);
  border-color: #277a6e;
}

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

.status-item {
  min-height: 78px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #ded8ce;
  border-radius: 8px;
}

.status-item span {
  display: block;
  color: #6e766f;
  font-size: 12px;
  font-weight: 700;
}

.status-item strong {
  display: block;
  margin-top: 8px;
  color: #17201d;
  font-size: 17px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.map-stage {
  position: relative;
  min-width: 0;
  min-height: 100vh;
}

#map {
  position: absolute;
  inset: 0;
  background: #d7ddd5;
}

.leaflet-control-layers,
.leaflet-control-zoom a {
  border-radius: 6px;
}

@media (max-width: 760px) {
  .map-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(420px, 1fr);
  }

  .map-panel {
    border-right: 0;
    border-bottom: 1px solid #d9d3c7;
    box-shadow: 0 10px 24px rgb(54 45 33 / 12%);
  }

  .map-stage {
    min-height: 70vh;
  }
}
