:root {
  --bg: #0f1419;
  --panel: #161b22;
  --panel-2: #1f2630;
  --border: #2a313d;
  --text: #e6edf3;
  --muted: #8b96a5;
  --green: #1b8e3d;
  --red: #c62828;
  --amber: #f9a825;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 24px;
}
header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
nav { display: flex; gap: 4px; }
.tab {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 6px;
}
.tab:hover { background: var(--panel-2); color: var(--text); }
.tab.active { background: var(--panel-2); color: var(--text); font-weight: 600; }
.badge {
  display: inline-block;
  background: var(--amber);
  color: #000;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
}
main { padding: 20px 24px; max-width: 1200px; margin: 0 auto; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar input[type="search"] {
  flex: 1;
  min-width: 240px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}
.filter-bar select, .filter-bar button {
  padding: 7px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.filter-bar button:hover { background: var(--panel-2); }
.muted { color: var(--muted); font-size: 12px; }
.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.list .card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.1s;
}
.list .card:hover { border-color: var(--primary); }
.card .thumb {
  width: 100%;
  height: 140px;
  background: #000;
  border-radius: 4px;
  margin-bottom: 8px;
  object-fit: cover;
}
.card .row { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: 12px; }
.card .name { font-weight: 600; font-size: 14px; }
.card .id { color: var(--muted); font-size: 11px; }
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.pill.ALLOWED { background: var(--green); color: #fff; }
.pill.NOT_ALLOWED { background: var(--red); color: #fff; }
.pill.UNKNOWN { background: var(--amber); color: #000; }
.pill.PENDING { background: var(--amber); color: #000; }
.pill.APPROVED { background: var(--green); color: #fff; }
.pill.REJECTED { background: #555; color: #fff; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.hidden { display: none; }
.modal-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  max-width: 720px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-box .close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}
.modal-box .close:hover { color: var(--text); }
.modal-box h2 { margin: 0 0 16px 0; }
.modal-box img.full {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #000;
  border-radius: 6px;
  margin-bottom: 12px;
}
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}
.field textarea { min-height: 60px; resize: vertical; }
.btn-row { display: flex; gap: 10px; margin-top: 16px; }
.btn {
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-hover); }
.btn.green { background: var(--green); color: #fff; }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.kv { font-size: 12px; color: var(--muted); margin: 4px 0; }
.kv strong { color: var(--text); font-weight: normal; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
