:root {
  --text: #1d2125;
  --muted: #5f6870;
  --bg: #ffffff;
  --surface: #f3f4f6;
  --accent: #b5480f;
  --error: #b42318;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e6e8ea;
    --muted: #a0a8b0;
    --bg: #16191c;
    --surface: #23272b;
    --accent: #f08a4b;
    --error: #f97066;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-name {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.username { color: var(--muted); }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem;
}

.messages { padding: 0; list-style: none; }
.messages li { padding: 0.5rem 0.75rem; background: var(--surface); }
.messages .error { color: var(--error); }

.app-list { padding: 0; list-style: none; }
.app-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--surface); }
.app-list a { font-size: 1.15rem; font-weight: 600; }
.app-list p { margin: 0.25rem 0 0; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.4rem 0.5rem; text-align: left; border-bottom: 1px solid var(--surface); }

.stacked-form { max-width: 22rem; }
.stacked-form div { margin-bottom: 0.75rem; }
.stacked-form label { display: block; }
.stacked-form input { width: 100%; padding: 0.4rem; font: inherit; }
.stacked-form .errorlist { color: var(--error); }

button {
  padding: 0.45rem 1rem;
  font: inherit;
}
