:root {
  --bg: #0f172a;
  --panel: #111c35;
  --text: #e5e7eb;
  --muted: #a3a3a3;
  --border: rgba(255,255,255,0.12);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.col {
  flex: 1;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

input[type="date"], select {
  background: #0b1224;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
}

input[type="date"] {
  min-width: 150px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  text-align: left;
  font-weight: 600;
  color: #cbd5e1;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.35);
}

.nowrap { white-space: nowrap; }

.img-thumb {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.latest {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Simple modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.modal {
  max-width: 95vw;
  max-height: 95vh;
  background: #0b1224;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.modal-body {
  padding: 12px;
}

.btn {
  background: #1f2a44;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.btn:hover {
  background: #253457;
}

.kv-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 12px;
  align-items: baseline;
}

.event-top {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;
  align-items: start;
}

.event-object {
  justify-self: end;
  width: 280px;
}

.event-object img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .event-top {
    grid-template-columns: 1fr;
  }
  .event-object {
    justify-self: start;
    width: 100%;
  }
}

.kv-key {
  color: #cbd5e1;
  font-weight: 600;
}

.kv-val {
  color: var(--text);
  word-break: break-word;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  font-size: 12px;
  line-height: 18px;
}

.warning {
  display: none;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  background: rgba(250, 204, 21, 0.08);
  color: #fde68a;
}

canvas {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}
