html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
header {
  padding: 8px 12px;
  background: #0b2239;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.refresh-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.refresh-btn, .auto-toggle {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.refresh-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auto-toggle.active {
  background: #10b981;
  color: white;
  border-color: #059669;
}

.auto-toggle:hover {
  background: #e2e8f0;
}

.auto-toggle.active:hover {
  background: #059669;
}

.last-update {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
}
.tab {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.tab.active {
  background: #e2e8f0;
}
.badge {
  background: #78350f;
  color: #fff1e6;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
}
.hidden { display: none; }

main {
  height: calc(100vh - 56px - 40px); 
}
#map {
  height: 100%;
  min-height: 320px;
  width: 100%;
  background: #eef5ff;
}
.panel { padding: 12px; }
#dataTable {
  width: 100%;
  border-collapse: collapse;
}
#dataTable th, #dataTable td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  font-size: 14px;
}

.latest { 
  margin: 12px 0 24px; 
  border: 2px solid #dc2626;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}
.latest h2 { 
  margin: 0 0 8px; 
  font-size: 18px; 
  color: #dc2626;
  display: flex;
  align-items: center;
  gap: 6px;
}
.latest h2:before {
  content: "🔴";
  font-size: 14px;
}
#latestMeta { 
  font-size: 12px; 
  color: #dc2626; 
  margin-bottom: 8px; 
  font-weight: 600;
}
#latestTable { 
  border-collapse: collapse; 
  width: 100%; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
#latestTable td { 
  border: 1px solid #fecaca; 
  padding: 6px 8px; 
  font-size: 13px; 
}
#latestTable td.key { 
  background: #fee2e2; 
  font-weight: 600; 
  width: 40%;
}
