:root {
  --bg: #0a0a0a;
  --panel: #151515;
  --line: #303030;
  --text: #f1f1f1;
  --muted: #aaa;
  --red: #d94035;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.45 Arial,
    sans-serif;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px max(20px, calc((100% - 1200px) / 2));
  background: #090909ee;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.brand {
  font-weight: 900;
  font-size: 24px;
  color: #fff;
  text-decoration: none;
}
.brand span {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
}
.topbar nav {
  display: flex;
  gap: 10px;
  align-items: center;
}
.topbar nav > a:not(.button) {
  color: #ddd;
  text-decoration: none;
}
.shell {
  width: min(1200px, calc(100% - 32px));
  margin: 30px auto 80px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.page-head h1 {
  margin: 0;
  font-size: 34px;
}
.page-head p {
  margin: 0.4rem 0;
  color: var(--muted);
}
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #444;
  background: #222;
  color: #fff;
  border-radius: 7px;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}
.button.primary,
button.primary {
  background: var(--red);
  border-color: var(--red);
}
button.danger {
  color: #ffaaa4;
}
.stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}
.event-list {
  display: grid;
  gap: 12px;
}
.event-card {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 16px;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.thumb {
  width: 100px;
  height: 80px;
  background: #222;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #777;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.event-main h2 {
  margin: 4px 0;
}
.event-main p,
.event-main small {
  margin: 0;
  color: var(--muted);
}
.badges {
  display: flex;
  gap: 7px;
}
.status,
.featured {
  font-size: 11px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: #333;
}
.status.published {
  background: #194d2b;
}
.status.draft {
  background: #5b4b12;
}
.featured {
  background: #74231e;
}
.actions {
  display: flex;
  gap: 8px;
}
.actions form {
  margin: 0;
}
.flash {
  padding: 12px 14px;
  border-radius: 7px;
  margin-bottom: 18px;
  background: #23452f;
}
.flash.error {
  background: #642923;
}
.editor section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px;
  margin: 16px 0;
}
.editor h2 {
  margin: 0 0 16px;
}
.grid {
  display: grid;
  gap: 15px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.wide {
  grid-column: 1/-1;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}
label small,
.note {
  font-weight: 400;
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  background: #090909;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 11px;
  font: inherit;
}
textarea {
  resize: vertical;
}
.checks {
  display: flex;
  gap: 20px;
  align-items: end;
  padding-bottom: 10px;
}
.checks label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checks input {
  width: auto;
}
.image-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
}
.preview {
  display: grid;
  gap: 8px;
}
.preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  background: #090909;
  border: 1px solid var(--line);
}
code {
  color: #e7c46a;
  overflow-wrap: anywhere;
}
.or {
  text-align: center;
  color: #777;
  font-size: 12px;
  font-weight: 900;
}
.save-actions {
  display: flex;
  gap: 10px;
}
.save-actions.bottom {
  justify-content: flex-end;
  margin-top: 20px;
}
.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

@media(max-width:760px){
  .topbar{
    padding:12px 16px;
    flex-wrap:wrap;
    justify-content:flex-start;
    align-items:flex-start;
    gap:10px;
  }

  .brand{
    width:100%;
  }

  .brand span{
    display:none;
  }

  .topbar nav{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    gap:8px 12px;
    align-items:center;
  }

  .topbar nav>a{
    flex:0 0 auto;
  }

  .shell{
    width:min(100% - 20px,1200px);
    margin-top:18px;
  }

  .page-head{
    display:block;
  }

  .page-head .button{
    margin-top:12px;
  }

  .event-card{
    grid-template-columns:80px 1fr;
  }

  .thumb{
    width:80px;
  }

  .actions{
    grid-column:1/-1;
  }

  .grid.two,
  .grid.three,
  .image-layout{
    grid-template-columns:1fr;
  }

  .grid.three span{
    display:none;
  }

  .checks{
    display:grid;
  }

  .save-actions{
    margin-top:12px;
  }

  .editor section{
    padding:16px;
  }
}