* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0; background: #f6f7f9; color: #1a1a1a;
}
.topnav {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 1.5rem; background: #1f2937; color: white;
}
.topnav a { color: white; text-decoration: none; }
.topnav .brand { font-weight: 600; }
.topnav .spacer { flex: 1; }
.topnav form.inline { margin: 0; display: inline; }
.topnav .link { background: none; border: 0; color: white; cursor: pointer; padding: 0; font: inherit; }
.container {
  max-width: 900px; margin: 2rem auto;
  background: white; border-radius: 8px;
  padding: 2rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
h1 { margin-top: 0; }
h2, h3 { margin-top: 2rem; }
.muted { color: #6b7280; font-size: 0.9rem; }
.flash {
  padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem;
}
.flash.error { background: #fee2e2; color: #991b1b; }
.flash.success { background: #d1fae5; color: #065f46; }
.flash.message { background: #dbeafe; color: #1e3a8a; }
.info {
  background: #dbeafe; color: #1e3a8a;
  padding: 1rem; border-radius: 6px; margin: 1rem 0;
}
form label { display: block; margin: 1rem 0; }
form label.inline { display: flex; align-items: center; gap: 0.5rem; }
input[type=text], input[type=password], textarea, input[type=file] {
  width: 100%; padding: 0.5rem;
  border: 1px solid #d1d5db; border-radius: 4px;
  font: inherit; margin-top: 0.25rem; background: white;
}
input[readonly] { background: #f3f4f6; }
textarea { font-family: ui-monospace, monospace; }
button, .btn {
  background: #2563eb; color: white; border: 0;
  padding: 0.6rem 1.2rem; border-radius: 6px;
  cursor: pointer; font: inherit;
  text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: #1d4ed8; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
button.link { background: none; color: #2563eb; padding: 0; }
button.link.danger { color: #dc2626; }
.danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #fee2e2; }
table.data { width: 100%; border-collapse: collapse; margin-top: 1rem; }
table.data th, table.data td {
  padding: 0.5rem 0.75rem; text-align: left;
  border-bottom: 1px solid #e5e7eb;
}
table.data th { background: #f9fafb; font-weight: 600; }
.card-list { list-style: none; padding: 0; }
.card-list li {
  padding: 1rem; border: 1px solid #e5e7eb;
  border-radius: 6px; margin-bottom: 0.5rem;
}
.file-list { font-family: ui-monospace, monospace; font-size: 0.9rem; }
details summary { cursor: pointer; margin-bottom: 1rem; font-weight: 600; }
code {
  background: #f3f4f6; padding: 0.1rem 0.3rem;
  border-radius: 3px; font-size: 0.9em;
}
.row { display: flex; gap: 1rem; }
.row > label { flex: 1; }
.status {
  display: inline-block; padding: 0.1rem 0.5rem;
  border-radius: 999px; font-size: 0.85em; font-weight: 600;
}
.status-active  { background: #d1fae5; color: #065f46; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-ended   { background: #fee2e2; color: #991b1b; }
.status-closed  { background: #e5e7eb; color: #374151; }
