:root {
  color-scheme: light;
  --bg: #f4f6f5;
  --panel: #ffffff;
  --text: #1d2b24;
  --muted: #68756e;
  --line: #d8e0dc;
  --green: #1f7a4d;
  --green-dark: #155d3a;
  --red: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

.app-shell {
  min-height: 100vh;
  padding: 20px;
}

.workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  min-height: 560px;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 18px;
}

.panel-header h1 {
  margin: 0 0 6px;
  font-size: 22px;
}

.panel-header p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
}

input,
select,
textarea {
  padding: 10px;
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  min-height: 42px;
  border: 0;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--green-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.status.error {
  color: var(--red);
}

.map-area {
  position: relative;
  min-height: 560px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #dfe8e2;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 560px;
}

.map-style-control {
  position: absolute;
  top: 12px;
  left: 12px;
  background: white;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  display: flex;
  gap: 12px;
  z-index: 1000;
}

.map-style-control label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}

.map-style-control input {
  width: auto;
  margin: 0;
  cursor: pointer;
}

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

.card {
  padding: 16px;
}

.card.wide {
  grid-column: span 3;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.muted {
  color: var(--muted);
}

.key-values {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.key-values div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #edf1ef;
  padding-bottom: 7px;
}

.key-values span:first-child {
  color: var(--muted);
}

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

.disease-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.disease-item strong {
  display: block;
  margin-bottom: 6px;
}

.disease-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

.chart {
  width: 100%;
  height: 360px;
  min-height: 360px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
}

th {
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 900px) {
  .workspace,
  .results-grid {
    grid-template-columns: 1fr;
  }

  .card.wide {
    grid-column: span 1;
  }

  .map-area,
  #map {
    min-height: 420px;
  }

  .chart {
    height: 320px;
    min-height: 320px;
  }
}

.demo-banner,
.info-banner {
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.demo-banner {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #b45309;
}

.info-banner {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

