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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: #1a1a2e;
  background: #f5f6fa;
  min-height: 100vh;
}

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box, .panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,.12);
  padding: 32px 36px;
  width: 380px;
}
.login-box h1, .panel h1 { font-size: 1.3rem; margin-bottom: 8px; }
.lede { color: #555; margin-bottom: 20px; font-size: 13px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label, .field span { font-size: 12px; font-weight: 600; color: #444; }
.field input, .field textarea {
  border: 1px solid #ccd;
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
}
.roles { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 8px 0 16px; }
.roles label { font-weight: 500; display: flex; gap: 6px; align-items: center; }

button, .btn {
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
  background: #1a1a2e;
  color: #fff;
}
button.secondary, .btn.secondary { background: #e8e9f0; color: #222; }
button.danger, .btn.danger { background: #c0392b; }
button:disabled { opacity: 0.6; cursor: default; }

.error { color: #c0392b; font-size: 13px; margin-bottom: 12px; }
.ok { color: #1e7a3a; font-size: 13px; margin-bottom: 12px; word-break: break-all; }

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #1a1a2e;
  color: #fff;
  padding: 12px 20px;
}
.app-header h1 { font-size: 1.05rem; flex: 1; }
.app-header .who { opacity: 0.75; font-size: 13px; }
.app-header a { color: rgba(255,255,255,.7); text-decoration: none; font-size: 13px; }
.app-header a:hover { color: #fff; }

main { padding: 24px; max-width: 960px; margin: 0 auto; }
h2 { font-size: 1.1rem; margin-bottom: 12px; }

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  padding: 18px 20px;
  margin-bottom: 20px;
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eef; vertical-align: top; }
th { font-size: 12px; color: #555; background: #f0f1f6; }
.muted { color: #888; font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.token-box {
  background: #f7f8ff;
  border: 1px solid #dde;
  border-radius: 4px;
  padding: 10px 12px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  word-break: break-all;
}
