:root {
  --bg: #0f1115;
  --panel: #161923;
  --panel-2: #1c202c;
  --border: #262b3a;
  --text: #e4e6eb;
  --muted: #8b8fa3;
  --accent: #4f7cff;
  --green: #35d07f;
  --red: #ff5c5c;
  --yellow: #f5b942;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.wrap { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: var(--panel);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
}
.sidebar .brand { padding: 0 20px 20px; font-weight: 700; font-size: 18px; color: var(--accent); }
.sidebar a {
  display: block;
  padding: 10px 20px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.sidebar a:hover, .sidebar a.active { color: var(--text); background: var(--panel-2); border-left-color: var(--accent); }
.main { flex: 1; padding: 28px 32px; max-width: 1100px; }
h1 { font-size: 22px; margin: 0 0 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.stat-card .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.active { background: rgba(53,208,127,.15); color: var(--green); }
.badge.revoked { background: rgba(255,92,92,.15); color: var(--red); }
.badge.expired { background: rgba(245,185,66,.15); color: var(--yellow); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.online { background: var(--green); }
.dot.offline { background: #46495a; }
.btn {
  display: inline-block; padding: 8px 14px; border-radius: 8px; border: none;
  background: var(--accent); color: #fff; font-size: 13px; cursor: pointer; text-decoration: none;
}
.btn.danger { background: var(--red); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=password] {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 14px;
}
.login-wrap { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-card { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 32px; width: 340px; }
.login-card h1 { text-align: center; }
.error { color: var(--red); font-size: 13px; margin: 10px 0; }
.row { display: flex; gap: 10px; align-items: center; }
.muted { color: var(--muted); font-size: 13px; }
.top-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
