:root {
  --bg-deep: #020203; --bg-base: #050506; --bg-elevated: #0c0c10; --bg-elevated-2: #131319;
  --fg: #f2f2f5; --fg-muted: #9497a6; --fg-dim: #6b6e7d;
  --border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.14);
  --accent-1: #7c5cff; --accent-2: #22d3ee;
  --accent-grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --radius-sm: 10px; --radius-md: 14px; --radius-lg: 20px;
  --font-display: 'Space Grotesk', sans-serif; --font-body: 'Inter', sans-serif; --font-mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-base); color: var(--fg); font-family: var(--font-body); font-size: 15px; }
h1, h2 { font-family: var(--font-display); margin: 0; }
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: none; font-weight: 600; cursor: pointer; font-size: 0.9rem; }
.btn-primary { background: var(--accent-grad); color: #08080b; width: 100%; }

.login-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-base); z-index: 10; }
.login-card { width: 320px; background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 32px; text-align: center; }
.login-card p { color: var(--fg-muted); font-size: 0.88rem; margin: 8px 0 18px; }
.login-card input { width: 100%; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: rgba(255,255,255,0.03); color: var(--fg); margin-bottom: 14px; font-size: 0.95rem; }
.login-error { color: #f87171; font-size: 0.82rem; min-height: 1.2em; margin-top: 10px; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(5,5,6,0.85); backdrop-filter: blur(12px); z-index: 5; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.range-select { display: flex; gap: 6px; }
.range-btn { background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--fg-muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 0.82rem; }
.range-btn.active { background: var(--accent-grad); color: #08080b; border-color: transparent; font-weight: 600; }

.content { max-width: 1100px; margin: 0 auto; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.stat-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 0.8rem; color: var(--fg-dim); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-size: 2.1rem; font-weight: 700; font-family: var(--font-display); }

.panel { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 24px; }
.panel h2 { font-size: 1.05rem; margin-bottom: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 800px) { .grid-2, .stat-row { grid-template-columns: 1fr; } }

.list { display: flex; flex-direction: column; gap: 10px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 0.88rem; }
.list-row .lbl { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.list-row .val { font-family: var(--font-mono); color: var(--accent-2); font-weight: 600; flex-shrink: 0; }
.list-empty { color: var(--fg-dim); font-size: 0.85rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.table-wrap { overflow-x: auto; }
th { text-align: left; color: var(--fg-dim); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
tr.session-row { cursor: pointer; }
tr.session-row:hover td { color: var(--fg); }
.table-empty { text-align: center; color: var(--fg-dim); padding: 24px; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; z-index: 20; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-card { background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 28px; max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--fg-dim); font-size: 1.4rem; cursor: pointer; }
.event-row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.event-time { font-family: var(--font-mono); color: var(--fg-dim); flex-shrink: 0; }
.event-type { color: var(--accent-2); font-weight: 600; flex-shrink: 0; }
.event-label { color: var(--fg-muted); }
