:root {
  --panel: rgba(13, 18, 33, 0.91);
  --panel2: rgba(18, 25, 43, 0.86);
  --border: rgba(255,255,255,0.10);
  --gold: #f59e0b;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #f97316;
  --blue: #38bdf8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'DM Sans', sans-serif;
  color: #fff;
  background:
    radial-gradient(circle at 20% 10%, rgba(245,158,11,0.16), transparent 34%),
    radial-gradient(circle at 90% 20%, rgba(56,189,248,0.10), transparent 34%),
    radial-gradient(circle at 40% 90%, rgba(249,115,22,0.10), transparent 36%),
    linear-gradient(135deg, #050713 0%, #080d1e 45%, #050713 100%);
  overflow-x: hidden;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: 0 20px 80px rgba(0,0,0,0.40);
  backdrop-filter: blur(14px);
}

.glass-soft {
  background: var(--panel2);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255,255,255,0.025) 50%, rgba(0,0,0,0.02) 50%);
  background-size: 100% 4px;
  opacity: 0.16;
  z-index: 50;
}

.tabular { font-variant-numeric: tabular-nums; }

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34,197,94,0.9);
  animation: livePulse 1.35s infinite;
}

.delayed-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 18px rgba(245,158,11,0.9);
}

.error-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 18px rgba(239,68,68,0.9);
}

@keyframes livePulse {
  0%,100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.45);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(255,255,255,0.04);
}

.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.text-blue { color: var(--blue); }
.text-muted { color: rgba(255,255,255,0.55); }
.text-muted2 { color: rgba(255,255,255,0.40); }

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-live.live {
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  color: var(--green);
}

.badge-live.delayed {
  background: rgba(245,158,11,0.15);
  border: 1px solid rgba(245,158,11,0.3);
  color: var(--gold);
}

.badge-live.error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--red);
}

.stat-card {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.stat-card .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}

.stat-card .value {
  font-size: 20px;
  font-weight: 900;
}

.stat-card .value.small {
  font-size: 14px;
}

.overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
}

.overlay-panel h2 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 8px;
}

.overlay-panel .section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.overlay-panel .section h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin: 0 0 8px;
}

.overlay-panel .section p {
  margin: 4px 0;
  font-size: 14px;
  word-break: break-all;
  line-height: 1.5;
}

.overlay-panel .note-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
}

.filter-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: all 0.15s;
}

.filter-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.filter-btn.active {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.3);
  color: var(--gold);
}

.small-scroll {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.small-scroll::-webkit-scrollbar { width: 6px; }
.small-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 99px; }

a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.8; }

@media (max-width: 768px) {
  .stat-card .value { font-size: 16px; }
  .overlay-panel { padding: 20px; }
  table { font-size: 12px; }
  thead th, tbody td { padding: 8px 8px; }
}
