:root {
  --bg: #0e0e10;
  --panel: #17171b;
  --panel-2: #1e1e24;
  --border: #2a2a32;
  --fg: #eaeaea;
  --muted: #8a8a92;
  --accent: #7c5cff;
  --accent-hover: #9579ff;
  --danger: #ff5c7c;
  --success: #5cffa1;
}
* { box-sizing: border-box; }
body {
  font-family: -apple-system, system-ui, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}
.wrap.wide { max-width: 880px; }

h1 { margin: 0 0 1rem; font-size: 2rem; letter-spacing: .02em; }
h2 { margin: 2rem 0 .8rem; font-size: 1.2rem; }
p.muted { color: var(--muted); margin: .25rem 0 1.5rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

label { display: block; margin: 1rem 0 .4rem; font-size: .9rem; color: var(--muted); }
input[type="email"], input[type="text"] {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 1rem;
}
input:focus { outline: none; border-color: var(--accent); }

button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.25rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.full { width: 100%; margin-top: 1.25rem; }
button.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
}
button.ghost:hover { background: var(--panel-2); }
button.danger { background: var(--danger); }
button.danger:hover { background: #ff8aa1; }
button.small { padding: .4rem .8rem; font-size: .85rem; }

.msg { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 8px; font-size: .9rem; display: none; }
.msg.error { background: rgba(255,92,124,.1); color: var(--danger); border: 1px solid rgba(255,92,124,.3); display: block; }
.msg.success { background: rgba(92,255,161,.1); color: var(--success); border: 1px solid rgba(92,255,161,.3); display: block; }

.foot {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}

table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
th, td { text-align: left; padding: .75rem .5rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
th { color: var(--muted); font-weight: 500; }
tbody tr:hover { background: var(--panel-2); }
.role-admin { color: var(--accent); font-weight: 600; }
.role-user { color: var(--muted); }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }

header.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
}
header.topbar .brand { font-weight: 700; letter-spacing: .05em; }
header.topbar nav { display: flex; gap: 1rem; align-items: center; }
header.topbar .pill {
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: .25rem .65rem;
  border-radius: 999px;
  font-size: .75rem;
  color: var(--muted);
}
header.topbar .pill.admin { color: var(--accent); border-color: var(--accent); }

.cred-list { margin-top: .5rem; }
.cred-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.cred-item .info { color: var(--muted); font-size: .8rem; }
