:root {
  --bg: #0f1115;
  --card: #171a21;
  --line: #262b36;
  --text: #e6e9ef;
  --muted: #9aa4b2;
  --accent: #4f8cff;
  --danger: #ff5c5c;
  --code: #ffcf5c;
}
* { box-sizing: border-box; }
/* Element display rules (e.g. `button { display: inline-block }`) must not
   override the `hidden` attribute the dashboard uses to switch views. */
[hidden] { display: none !important; }
body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
header h1 { margin: 0; font-size: 20px; }
header .sub { color: var(--muted); font-size: 13px; }
header #logoutBtn { margin-left: auto; }
main, #loginView, #setupView { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.card.reveal { border-color: #3a3320; background: #1b1810; }
h2 { margin: 0 0 8px; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row.between { justify-content: space-between; align-items: flex-start; }
label { display: block; margin: 10px 0; font-size: 13px; color: var(--muted); }
input[type="text"], input[type="password"], input:not([type]) {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 11px;
  background: #0e1016;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
}
button, .btn {
  font: inherit;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button.ghost, .btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.small { padding: 4px 9px; font-size: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
.error { color: var(--danger); min-height: 18px; }
.codebox {
  background: #0e1016; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; white-space: pre-wrap; word-break: break-all; font-size: 12px;
}
.switch { display: flex; align-items: center; gap: 8px; color: var(--text); }
.recent .item {
  border-bottom: 1px solid var(--line); padding: 10px 0;
}
.recent .item:last-child { border-bottom: none; }
.recent .meta { color: var(--muted); font-size: 12px; }
.badge-code {
  color: var(--code); border: 1px solid var(--code); border-radius: 6px;
  padding: 1px 6px; font-size: 11px; margin-left: 6px;
}
.revealed { color: var(--code); font-family: monospace; }
