:root {
  --paper: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #16233d;
  --ink-soft: #4a5670;
  --ink-faint: #7c8aa3;
  --line: #dce2ea;
  --line-strong: #c3ccd9;
  --accent: #c2551a;
  --accent-ink: #7a3410;
  --accent-soft: #f4e1d2;
  --accent-soft-line: #e7be9c;
  --ok: #2f7d53;
  --ok-soft: #dff1e7;
  --critical: #c13a3a;
  --critical-soft: #f8e0df;
  --shadow: 0 1px 2px rgba(22, 35, 61, 0.06), 0 12px 32px -16px rgba(22, 35, 61, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

h1, h2, h3 {
  font-family: "Oswald", "Arial Narrow", sans-serif;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin: 0;
  text-wrap: balance;
}

code, .mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.wrap {
  width: 100%;
  max-width: 440px;
}

.brandmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "IBM Plex Mono";
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 22px;
  justify-content: center;
}

.brandmark b {
  color: var(--ink);
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.eyebrow {
  font-family: "IBM Plex Mono";
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.eyebrow:before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1 {
  font-size: 26px;
}

.sub {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-top: 10px;
  margin-bottom: 26px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  border-radius: 6px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: "IBM Plex Sans";
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  filter: brightness(0.96);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  background: var(--surface-2);
  filter: none;
}

.hint {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.6;
}

.hint b {
  color: var(--ink-soft);
  font-weight: 600;
}

.demo-users {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.demo-users table {
  width: 100%;
  border-collapse: collapse;
}

.demo-users th, .demo-users td {
  padding: 7px 10px;
  font-size: 12.5px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.demo-users th {
  background: var(--surface-2);
  font-family: "IBM Plex Mono";
  font-size: 10.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}

.demo-users tr:last-child td {
  border-bottom: none;
}

.demo-users td.mono {
  color: var(--ink);
}

/* --- authenticated view --- */
.identity-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Oswald";
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

.identity-head h1 {
  font-size: 20px;
}

.identity-head .sub-line {
  color: var(--ink-faint);
  font-size: 13px;
  margin-top: 2px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}

.field-row:last-of-type {
  border-bottom: none;
}

.field-row .k {
  color: var(--ink-faint);
  font-family: "IBM Plex Mono";
  font-size: 11.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding-top: 2px;
}

.field-row .v {
  color: var(--ink);
  text-align: right;
  font-family: "IBM Plex Mono";
  font-size: 13px;
}

.roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.pill {
  display: inline-block;
  font-family: "IBM Plex Mono";
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1px solid var(--accent-soft-line);
}

.badge {
  display: inline-block;
  font-family: "IBM Plex Mono";
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid var(--ok);
  margin-left: 8px;
  vertical-align: middle;
}

.actions {
  margin-top: 24px;
  display: flex;
  gap: 10px;
}

.status-line {
  text-align: center;
  color: var(--ink-faint);
  font-size: 13.5px;
  margin-top: 14px;
}

.error-box {
  background: var(--critical-soft);
  border: 1px solid var(--critical);
  color: var(--critical);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13.5px;
  margin-top: 18px;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .card { padding: 26px 20px; }
}
