/* Base Reset & Theme */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
  color: #1b1f23;
  background: #f6f8fa;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.assistive {
  color: #586069;
  font-size: 0.9rem;
}
.warning {
  color: #b00020;
  margin-top: 8px;
}
.warning[hidden] {
  display: none;
}

/* Header */
.site-header {
  background: #0f172a; /* deep slate */
  color: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.site-header .container {
  padding: 24px 16px;
}
.site-header h1 {
  margin: 0;
  font-size: 2rem;
}
.site-header .tagline {
  margin: 4px 0 0;
  opacity: 0.85;
}

/* Footer */
.site-footer {
  background: #ffffff;
  color: #334155; /* slate-700 */
  border-top: 1px solid #e5e7eb;
  margin-top: 32px;
}
.site-footer .container {
  padding: 16px;
  text-align: center;
  font-size: 0.95rem;
}

/* Controls */
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
}
.controls input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #cfd5dc;
  border-radius: 8px;
  background: #fff;
}
.controls input:focus {
  outline: 2px solid #4b6cb7;
}

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 540px) {
  .controls {
    flex-direction: column;
  }
  .site-header .container {
    padding: 20px 12px;
  }
  .events-section h2,
  .form-section h2 {
    font-size: 1.1rem;
  }
}

/* Events Section */
.events-section h2,
.form-section h2 {
  margin: 8px 0 12px;
}
.events-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.event-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.event-card .title {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 6px;
}
.event-card .date {
  font-size: 0.95rem;
  color: #374151;
  margin-bottom: 8px;
}
.event-card .desc {
  font-size: 0.95rem;
  color: #1f2937;
  margin-bottom: 12px;
}
.event-card .actions {
  display: flex;
  justify-content: flex-end;
}

/* Past vs Upcoming */
.event-card.upcoming {
  border-left: 4px solid #10b981;
}
.event-card.upcoming:hover {
  border-color: #059669;
}
.event-card.past {
  border-left: 4px solid #9ca3af;
  background: #f3f4f6;
}
.event-card.past:hover {
  border-color: #6b7280;
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
}
button.primary {
  background: #2563eb;
  color: #fff;
}
button.primary:hover {
  background: #1d4ed8;
}
button.danger {
  background: #ef4444;
  color: #fff;
}
button.danger:hover {
  background: #dc2626;
}

/* Form */
.form-section {
  background: #fff;
  border: 1px solid #e6ebf1;
  border-radius: 12px;
  padding: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.form-field input,
.form-field textarea {
  padding: 10px 12px;
  border: 1px solid #cfd5dc;
  border-radius: 8px;
  background: #fff;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid #4b6cb7;
}
.form-field input:invalid,
.form-field textarea:invalid {
  border-color: #ef4444;
}
