html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, sans-serif;
  background: #101418;
  color: #d5dde5;
  overflow: hidden;
}

#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: rgba(16, 20, 24, 0.92);
  border-bottom: 1px solid #232b33;
  z-index: 20;
}

.brand { font-size: 15px; letter-spacing: 0.02em; }
.brand b { color: #7fc4ff; }

.field { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #9fb2c0; }
select, button {
  background: #1a2129;
  color: #d5dde5;
  border: 1px solid #33414d;
  border-radius: 4px;
  padding: 5px 9px;
  font-size: 13px;
}
button { cursor: pointer; }
button:hover { background: #232c36; }

#fps { margin-left: auto; font-variant-numeric: tabular-nums; color: #7fd8a4; font-size: 13px; }

#sidebar {
  position: fixed;
  top: 48px; left: 0; bottom: 28px;
  width: 240px;
  padding: 14px;
  background: rgba(16, 20, 24, 0.88);
  border-right: 1px solid #232b33;
  z-index: 15;
  overflow-y: auto;
}
#sidebar h3 {
  margin: 14px 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7fc4ff;
}
#sidebar label { display: block; margin: 6px 0; font-size: 13px; color: #c3d0da; }
#sidebar .muted { color: #5d707d; }
#sidebar button { display: block; width: 100%; margin: 6px 0; text-align: left; }

.meta { font-size: 12px; line-height: 1.6; color: #9fb2c0; }
.meta b { color: #d5dde5; }

#cesiumContainer {
  position: fixed;
  top: 48px; left: 240px; right: 0; bottom: 28px;
}

#statusbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  background: rgba(16, 20, 24, 0.95);
  border-top: 1px solid #232b33;
  font-size: 12px;
  color: #9fb2c0;
  z-index: 20;
}
#progress { flex: 1; height: 6px; }

#errorbar {
  position: fixed;
  top: 60px; left: 50%;
  transform: translateX(-50%);
  background: #5b2222;
  color: #ffd9d9;
  border: 1px solid #8a3a3a;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 13px;
  z-index: 40;
}

.row { display: flex; gap: 6px; margin: 6px 0; }
.row.small button { padding: 3px 7px; font-size: 12px; }
.row input[type="text"] { flex: 1; background: #1a2129; color: #d5dde5; border: 1px solid #33414d; border-radius: 4px; padding: 5px 8px; font-size: 13px; }
#replayScrub { width: 100%; margin: 8px 0; }
.btnlink { color: #7fc4ff; font-size: 12px; text-decoration: none; display: inline-block; margin-top: 6px; }
.viewitem { margin: 4px 0; }
.viewitem a { color: #7fc4ff; text-decoration: none; font-size: 13px; }
#replayPanel select { width: 100%; }

/* Jobs panel (Phase 7) */
.jobitem { margin: 8px 0 12px; }
.jobhead { display: flex; gap: 8px; align-items: baseline; }
.jobstate { font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #33414d; }
.jobstate-succeeded { background: #2e5d3a; }
.jobstate-failed { background: #6e2f2f; }
.jobstate-running { background: #2f5470; }
.jobchips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.stagechip { font-size: 10px; padding: 1px 5px; border-radius: 3px; background: #222b34; color: #7d8b96; }
.stagechip.stage-succeeded { background: #2e5d3a; color: #d5dde5; }
.stagechip.stage-failed { background: #6e2f2f; color: #d5dde5; }
.stagechip.stage-running { background: #2f5470; color: #d5dde5; }
.joberr { color: #e57373; font-size: 11px; margin-top: 3px; }

/* Ingest panel + jobs view (ingestion front door) */
.ingestrow { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.filelabel { display: block; font-size: 12px; color: #9fb2c0; }
.filelabel input { display: block; margin-top: 3px; font-size: 12px; color: #d5dde5; max-width: 200px; }
#ingestProgress { width: 100%; margin: 6px 0; }
.jobview { color: #7fc4ff; font-size: 11px; margin-left: 8px; }
.joblogs { font-size: 11px; color: #7d8b96; background: #131a21; border-radius: 4px; padding: 6px 8px; margin-top: 5px; max-height: 180px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; }
.jobchips { cursor: pointer; }
