:root {
  --navy: #0a2a4d;
  --red: #b22222;
  --cream: #f5f1e6;
  --text: #222;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--cream);
}

.env-banner {
  background: var(--red);
  color: white;
  text-align: center;
  padding: 6px;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.site-header {
  background: var(--navy);
  color: white;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: bold;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-button {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.nav-logout-form {
  display: inline-flex;
  margin: 0;
}

.content {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 60vh;
}

.hero {
  text-align: center;
  padding: 2rem 0;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  display: block;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.card h2 {
  color: var(--navy);
  margin-top: 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.data-table th, .data-table td {
  border: 1px solid #ddd;
  padding: 0.6rem 0.8rem;
  text-align: left;
}

.data-table th {
  background: var(--navy);
  color: white;
}

.event-list {
  list-style: none;
  padding: 0;
}

.event-item {
  display: flex;
  gap: 1.2rem;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.event-date {
  flex-shrink: 0;
  font-weight: bold;
  color: var(--red);
  min-width: 110px;
}

.event-details h2 {
  margin: 0 0 0.3rem;
  color: var(--navy);
}

.bylaw-section {
  margin-bottom: 1.2rem;
}

.bylaw-section h3 {
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.note {
  font-style: italic;
  color: #555;
}

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

.link-button {
  background: none;
  border: none;
  color: var(--red);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.inline-form {
  display: inline;
  margin-left: 1.5rem;
}

.nav-button.link-button {
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
}

.nav-button.link-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.row-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.row-actions .inline-form {
  margin-left: 0;
}

.auth-form, .edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin-top: 1rem;
}

.auth-form label, .edit-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  color: var(--navy);
}

.auth-form input, .edit-form input, .edit-form textarea, .edit-form select {
  font: inherit;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.auth-form button, .edit-form button {
  align-self: flex-start;
  background: var(--navy);
  color: white;
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.auth-form button:hover, .edit-form button:hover {
  opacity: 0.9;
}

.form-error {
  background: #fdecea;
  color: #b22222;
  border: 1px solid #f5c6cb;
  padding: 0.8rem 1rem;
  border-radius: 4px;
}

.role-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}

.badge {
  font-size: 0.7rem;
  background: var(--navy);
  color: white;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  vertical-align: middle;
}

.permission-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.8rem 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
}

.section-body {
  line-height: 1.6;
}
