* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  display: flex;
  height: 100vh;
}
.sidebar {
  width: 380px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
}
.sidebar-top {
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
}
h2 { font-size: 16px; margin-bottom: 2px; }
.subtitle { font-size: 11px; color: #888; margin-bottom: 8px; }

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-title h2 { flex: 1; }
.brand-logo {
  width: 32px;
  height: 26px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
}
.gh-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
  text-decoration: none;
  border-radius: 4px;
  padding: 4px;
  transition: color .15s, background .15s;
}
.gh-link:hover { color: #111; background: #f0f0f0; }

label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 3px;
  margin-top: 8px;
}
input, select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 6px;
}
input:focus, select:focus { outline: none; border-color: #2196f3; }

button {
  padding: 7px 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}
button:hover { opacity: .85; }
button:disabled { opacity: .4; cursor: default; }

.btn-primary { background: #2196f3; color: #fff; }
.btn-outline { background: transparent; border: 1px solid #ddd; color: #555; }
.btn-draw { background: #ff9800; color: #fff; }
.btn-fetch { background: #4caf50; color: #fff; }
.btn-analyze { background: #9c27b0; color: #fff; }
.btn-row { display: flex; gap: 6px; margin: 8px 0; }

.hidden { display: none; }

body.drag-over::after {
  content: 'Drop COG file to load';
  position: fixed;
  inset: 0;
  background: rgba(33, 150, 243, .12);
  border: 3px dashed #2196f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: #1565c0;
  pointer-events: none;
  z-index: 9999;
}
