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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

nav {
  background: #1a1a2e;
  color: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

nav .brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e0c097;
  text-decoration: none;
}

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

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

.nav-links a:hover { color: #fff; }

main {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 { margin-bottom: 1rem; }
h2 { margin: 1.5rem 0 0.75rem; }

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

.stat {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
}

.stat-label {
  color: #666;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td { padding: 0.625rem 0.75rem; text-align: left; }
th { background: #f0f0f0; font-weight: 600; font-size: 0.875rem; }
tr:not(:last-child) td { border-bottom: 1px solid #eee; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-attendee { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.badge-volunteer { background: #f3e5f5; color: #7b1fa2; border: 1px solid #ce93d8; }
.badge-checkedin { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }

button.badge { cursor: pointer; }
button.badge:hover { filter: brightness(0.95); }

.btn-checkin {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f5f5f5;
  color: #999;
  border: 1px dashed #ccc;
  cursor: pointer;
}

.btn-checkin:hover { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }

tr.checked-in { background: #f9fdf9; }

.toolbar {
  margin-bottom: 1rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

input[type="text"],
input[type="email"],
input[type="password"],
select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.875rem;
}

input[type="file"] { margin: 0.5rem 0; }

button {
  padding: 0.5rem 1rem;
  background: #1a1a2e;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
}

button:hover { background: #2a2a4e; }

.link-btn {
  background: none;
  color: #1565c0;
  padding: 0;
  font-size: 0.8125rem;
  text-decoration: underline;
}

.link-btn:hover { background: none; color: #0d47a1; }
.link-btn.danger { color: #c62828; }
.link-btn.danger:hover { color: #b71c1c; }

.inline { display: inline; }

.actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.actions a {
  font-size: 0.8125rem;
  color: #1565c0;
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.add-form {
  background: #fff;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.add-form summary { cursor: pointer; font-weight: 600; }
.add-form[open] summary { margin-bottom: 0.75rem; }

.form-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.edit-form {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  max-width: 480px;
}

.edit-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.edit-form input,
.edit-form select { display: block; width: 100%; margin-top: 0.25rem; }

.form-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
}

.upload-form {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.upload-form label { font-weight: 600; }

.format-help {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.format-help pre {
  background: #f5f5f5;
  padding: 0.75rem;
  border-radius: 4px;
  margin: 0.75rem 0;
  font-size: 0.8125rem;
  overflow-x: auto;
}

.format-help code {
  background: #f0f0f0;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.8125rem;
}

.error { color: #c62828; margin-bottom: 1rem; }
.success { color: #2e7d32; margin-bottom: 1rem; }

.error-list { background: #ffebee; padding: 1rem; border-radius: 4px; margin-bottom: 1rem; }
.error-list ul { margin-left: 1.25rem; }

.login-container {
  max-width: 320px;
  margin: 15vh auto;
  text-align: center;
}

.login-container h1 {
  font-size: 2rem;
  color: #1a1a2e;
  margin-bottom: 1.5rem;
}

.login-container form {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.login-container input {
  width: 100%;
  margin-bottom: 1rem;
}

.login-container button { width: 100%; }

.empty { text-align: center; color: #999; padding: 2rem !important; }
