:root {
  --bg: #08090a; --card: #131516; --card-2: #1b1e1f; --line: rgba(255,255,255,.07);
  --ink: #f4f5f5; --ink-2: #b9bfc1; --muted: #737a7d; --dim: #4a5053;
  --heat: #ff821b; --rec: #ff4d4f; --good: #4cc38a; --warn: #f5b84a; --water: #5fb3c2;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); }
body { font-family: "DM Sans", system-ui, sans-serif; color: var(--ink); font-feature-settings: "tnum" 1; min-height: 100vh; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px 48px; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.card { background: var(--card); border-radius: 18px; padding: 18px 20px; }

/* top bar */
.top { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .3em; color: var(--ink-2); text-decoration: none; }
.brand b { width: 10px; height: 10px; border-radius: 50%; background: var(--heat); box-shadow: 0 0 14px var(--heat); }
.brand span { color: var(--muted); letter-spacing: .2em; font-weight: 500; }
.top .sp { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); }
.who img { width: 28px; height: 28px; border-radius: 50%; }
.who button { font-size: 12px; color: var(--muted); padding: 6px 10px; border-radius: 8px; background: var(--card); }

/* devices */
.devs { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; margin-bottom: 22px; }
.dev .hd { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dev .hd h3 { font-size: 16px; font-weight: 500; }
.pill { height: 22px; padding: 0 9px; border-radius: 11px; display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; background: var(--card-2); color: var(--muted); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.pill.on { color: var(--good); } .pill.on i { background: var(--good); }
.pill.rec { color: var(--ink); background: rgba(255,77,79,.14); } .pill.rec i { background: var(--rec); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.dev .seen { margin-left: auto; font-size: 12px; color: var(--muted); }
.live { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.live div { background: var(--card-2); border-radius: 12px; padding: 8px 10px; }
.live b { display: block; font-size: 20px; font-weight: 300; margin-top: 2px; }
.live b small { font-size: 11px; color: var(--muted); margin-left: 2px; }

/* sessions */
.bar { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; }
.bar h2 { font-size: 20px; font-weight: 500; margin-right: auto; }
.search { height: 36px; width: 240px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 0 12px; font: inherit; font-size: 13px; }
.btn { height: 36px; padding: 0 14px; border-radius: 10px; background: var(--card-2); font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn.pri { background: var(--heat); color: #1a0d02; }
.btn:disabled { opacity: .35; cursor: default; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; }
th.num, td.num { text-align: right; }
td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr { cursor: pointer; transition: background .12s; }
tbody tr:hover { background: var(--card-2); }
td .t { font-weight: 500; }
td .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
td.peak { color: var(--heat); font-size: 16px; }
td input { width: 16px; height: 16px; accent-color: var(--heat); }
.empty { color: var(--muted); padding: 40px; text-align: center; }

/* compare + run */
.cmp { margin-bottom: 22px; display: none; }
.cmp.show { display: block; }
.charts { display: grid; grid-template-columns: 1fr; gap: 12px; }
.chartcard { padding: 14px 16px 10px; }
.chartcard .hd { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.chartcard canvas { width: 100%; height: 280px; display: block; }
.chartcard.small canvas { height: 190px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; }
.legend span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.legend span i { width: 10px; height: 3px; border-radius: 2px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rhead { display: flex; align-items: flex-end; gap: 14px; margin: 8px 0 16px; }
.rhead h1 { font-size: 30px; font-weight: 400; letter-spacing: -.01em; }
.rhead .sub { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.rhead .sp { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.stat { background: var(--card); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-size: 24px; font-weight: 300; margin-top: 4px; }
.stat b small { font-size: 12px; color: var(--muted); margin-left: 2px; }
.evlist { font-size: 13px; color: var(--ink-2); display: grid; gap: 6px; }
.evlist div { display: flex; gap: 12px; } .evlist span { color: var(--muted); width: 52px; }
.notes { white-space: pre-wrap; font-size: 12px; color: var(--muted); line-height: 1.5; }
.back { font-size: 13px; color: var(--muted); text-decoration: none; }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login .card { width: 380px; padding: 32px; text-align: center; }
.login h1 { font-size: 24px; font-weight: 500; margin: 14px 0 6px; }
.login p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login .btn { width: 100%; justify-content: center; height: 44px; margin-top: 10px; }
.login input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); padding: 0 12px; font: inherit; margin-top: 14px; }
.err { color: var(--rec); font-size: 13px; margin-top: 12px; }

@media (max-width: 760px) {
  .wrap { padding: 0 14px 40px; }
  .devs { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .hide-m { display: none; }
  .search { width: 140px; }
  .rhead { flex-wrap: wrap; }
  .chartcard canvas { height: 220px; }
}

/* team */
.note { margin-bottom: 12px; padding: 12px 16px; font-size: 13px; color: var(--ink-2); }
.addm { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 12px 16px; flex-wrap: wrap; }
.addm .search { width: 320px; max-width: 100%; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.chk input { accent-color: var(--heat); width: 16px; height: 16px; }
tbody.static tr { cursor: default; }
td.s, .s { font-size: 12px; color: var(--muted); }
.acts form { display: inline-flex; gap: 6px; }
.acts .btn { height: 30px; font-size: 12px; padding: 0 10px; }
.btn.danger { color: var(--rec); }
.who .teamlink { font-size: 12px; color: var(--muted); padding: 6px 10px; border-radius: 8px; background: var(--card); text-decoration: none; }
