*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0f;
  --surface:   #111118;
  --border:    #1e1e2e;
  --accent:    #7c3aed;
  --accent2:   #a855f7;
  --text:      #e2e8f0;
  --muted:     #64748b;
  --green:     #22c55e;
  --red:       #ef4444;
  --yellow:    #eab308;
  --radius:    8px;
  --font:      'Inter', system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

header h1 { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
header span { color: var(--accent2); font-size: 12px; background: #1e1030; padding: 2px 8px; border-radius: 20px; }

.tabs {
  display: flex;
  gap: 2px;
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--border);
}

.tab {
  padding: 8px 20px;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  transition: all .15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent2); border-bottom-color: var(--accent2); }

.panel { display: none; padding: 24px; }
.panel.active { display: block; }

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

input[type=text], input[type=password] {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
input[type=text]:focus, input[type=password]:focus { border-color: var(--accent); }

button {
  padding: 8px 16px;
  border-radius: var(--radius);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
button:hover { opacity: .85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-danger  { background: var(--red); color: #fff; }
.btn-warn    { background: var(--yellow); color: #000; }
.btn-sm      { padding: 4px 10px; font-size: 12px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:hover td { background: rgba(255,255,255,.02); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-active   { background: #052e16; color: var(--green); }
.badge-inactive { background: #1c1c0a; color: var(--yellow); }
.badge-revoked  { background: #2d0a0a; color: var(--red); }
.badge-expired  { background: #1e1e2e; color: var(--muted); }

.key-text {
  font-family: monospace;
  font-size: 13px;
  color: var(--accent2);
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 4px;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }

.auth-screen {
  max-width: 360px;
  margin: 80px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
}
.auth-screen h2 { margin-bottom: 8px; }
.auth-screen p  { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.auth-screen input { width: 100%; margin-bottom: 12px; }
.auth-screen button { width: 100%; }

.payload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 500px;
  margin-bottom: 24px;
}
.payload-card h3 { margin-bottom: 8px; }
.payload-card p  { color: var(--muted); font-size: 13px; line-height: 1.6; }

.empty { color: var(--muted); text-align: center; padding: 40px; font-size: 14px; }
.error-msg { color: var(--red); font-size: 13px; margin-top: 8px; }
