:root {
  color-scheme: light;
  --brand-color: #1b3a5c;
  --border-color: #d6dbe1;
  --error-color: #b3261e;
  --notice-color: #1b6e3f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #f5f6f8;
  color: #1c1e21;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--brand-color);
  color: #fff;
}

.brand {
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav a {
  color: #fff;
  text-decoration: none;
}

.nav-user {
  opacity: 0.85;
}

.container {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  max-width: 420px;
  margin: 0 auto;
}

form label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

form input[type="email"],
form input[type="password"],
form input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

form button,
.button {
  margin-top: 1.25rem;
  padding: 0.6rem 1.2rem;
  background: var(--brand-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}

.link-button {
  background: none;
  border: none;
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.inline-form {
  display: inline;
}

.checkbox {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hint {
  color: #555;
  font-size: 0.9rem;
}

.alert {
  padding: 0.6rem 1rem;
  border-radius: 4px;
  margin-top: 1rem;
}

.alert-error {
  background: #fbe9e7;
  color: var(--error-color);
}

.alert-notice {
  background: #e6f4ea;
  color: var(--notice-color);
}

.qr-code {
  display: block;
  margin: 1rem auto;
  width: 200px;
  height: 200px;
}

.secret-box {
  font-size: 1.2rem;
  background: #f0f0f0;
  padding: 0.75rem;
  border-radius: 4px;
  text-align: center;
}

.admin-nav {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
}

.stat-label {
  color: #555;
  font-size: 0.85rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.table th,
.table td {
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.9rem;
}

.actions form {
  margin-right: 0.25rem;
}
