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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f0f0f;
  color: #f0f0f0;
  min-height: 100vh;
}

.inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Header ── */

header {
  border-bottom: 1px solid #222;
  padding: 1.25rem 0;
}

header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.view-tabs {
  display: flex;
  gap: 0.1rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 7px;
  padding: 3px;
}

.tab {
  font-size: 0.8rem;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: #ccc; }
.tab-active { background: #2e2e2e; color: #fff !important; }

h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

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

button {
  background: #fff;
  color: #000;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

button:hover { opacity: 0.85; }
button:disabled { opacity: 0.4; cursor: default; }

.admin-link {
  font-size: 0.8rem;
  color: #666;
  text-decoration: none;
}
.admin-link:hover { color: #fff; }

.status {
  font-size: 0.8rem;
  color: #888;
}

.status.running { color: #f0a500; }
.status.done    { color: #4caf50; }
.status.error   { color: #f44; }

/* ── Filter bar ── */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #1e1e1e;
}

.filter-venue {
  position: relative;
}

.filter-btn {
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #2e2e2e;
  padding: 0.5rem 0.95rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}
.filter-btn:hover { border-color: #555; color: #fff; opacity: 1; }
.filter-btn .caret { font-size: 0.7rem; color: #666; }

.filter-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 180px;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.filter-dropdown.hidden { display: none; }

.dd-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  color: #ccc;
  cursor: pointer;
  white-space: nowrap;
}
.dd-item:hover { background: #242424; color: #fff; }
.dd-item input[type="checkbox"] { accent-color: #fff; cursor: pointer; }

.filter-date-input {
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  color: #ccc;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  outline: none;
  cursor: pointer;
}
.filter-date-input:hover { border-color: #555; }
.filter-date-input::-webkit-calendar-picker-indicator { filter: invert(0.5); cursor: pointer; }

.filter-search {
  flex: 1;
  min-width: 160px;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  color: #ccc;
  padding: 0.5rem 0.95rem;
  font-size: 1rem;
  outline: none;
}
.filter-search::placeholder { color: #555; }
.filter-search:hover { border-color: #555; }
.filter-search:focus { border-color: #666; color: #fff; }

/* ── Events grid ── */

main {
  padding: 2rem 1.5rem;
}

#events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.event-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}

.event-card:hover { border-color: #444; }

.event-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #222;
}

.event-card .card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.event-card .venue {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
}

.event-card .title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.event-card .when {
  font-size: 0.82rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-today {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #4caf50;
  color: #000;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.badge-soon {
  font-size: 0.68rem;
  font-weight: 700;
  background: #2a2a2a;
  color: #f0a500;
  border: 1px solid #f0a500;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.event-card .description {
  font-size: 0.82rem;
  color: #888;
  line-height: 1.5;
  margin-top: 0.25rem;
  flex: 1;
}

.event-card .card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #222;
}

.event-card a {
  font-size: 0.8rem;
  color: #aaa;
  text-decoration: none;
}

.event-card a:hover { color: #fff; }

.empty {
  color: #555;
  font-size: 0.9rem;
  grid-column: 1/-1;
  padding: 2rem 0;
}
