:root {
  /* Inaivia brand: violet #563ede + orange #f7941d on a violet-black ground (#080314) */
  --bg: #0a0714; --panel: #16101f; --panel2: #221830; --line: #322843;
  --text: #e9e5f2; --muted: #9c90b4;
  --brand: #563ede; --brand-2: #f7941d;
  --accent: #8b7bf5;            /* lightened brand violet for links/icons on dark */
  --danger: #f87171; --ok: #4ade80;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, Segoe UI, Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
header.topbar {
  display: flex; align-items: center; gap: 20px; padding: 12px 24px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
header.topbar .brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: .3px; color: var(--text); text-decoration: none;
}
header.topbar .brand:hover { text-decoration: none; }
.brand-mark { height: 26px; width: auto; display: block; }
header.topbar nav { display: flex; gap: 16px; margin-left: auto; }
main { padding: 24px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 20px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
tr:hover td { background: var(--panel2); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.on { background: rgba(74,222,128,.15); color: var(--ok); }
.badge.off { background: rgba(148,163,184,.15); color: var(--muted); }
.badge.warn { background: rgba(248,113,113,.15); color: var(--danger); }
.badge.brand { background: rgba(247,148,29,.16); color: var(--brand-2); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat { font-size: 26px; font-weight: 700; }
.stat-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.btn {
  display: inline-block; background: var(--brand); color: #fff; font-weight: 700;
  border: none; border-radius: 8px; padding: 9px 16px; cursor: pointer; font-size: 14px;
}
.btn.secondary { background: var(--panel2); color: var(--text); border: 1px solid var(--line); }
.btn.accent { background: var(--brand-2); color: #1a1005; }   /* orange CTA (e.g. live) */
.btn:hover { filter: brightness(1.1); }
input, select, textarea {
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; font: inherit; width: 100%;
}
label { display: block; color: var(--muted); font-size: 12px; margin: 10px 0 4px; }

/* timeline */
.timeline { position: relative; height: 34px; background: var(--bg); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.timeline.afk { height: 14px; }
.seg { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.bar { height: 10px; border-radius: 5px; background: var(--panel2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }

/* screenshots */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.shot { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.shot img { width: 100%; display: block; }
.shot .meta { padding: 6px 8px; font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.flash { background: rgba(56,189,248,.12); border: 1px solid var(--accent); padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }

/* login */
.login-wrap { max-width: 340px; margin: 10vh auto; }
.login-logo { width: 200px; max-width: 70%; height: auto; display: block; margin-bottom: 6px; }
.err { color: var(--danger); margin: 8px 0; }

/* print / save-as-PDF: drop chrome and go light for a clean report */
@media print {
  :root { --bg: #fff; --panel: #fff; --panel2: #f4f4f6; --line: #ccc; --text: #111; --muted: #555; }
  header.topbar, .noprint { display: none !important; }
  body { background: #fff; color: #111; }
  main { max-width: 100%; padding: 0; }
  .panel { border: 1px solid #ccc; break-inside: avoid; }
  a { color: #111; text-decoration: none; }
}
