:root {
  --bg: #090707;
  --panel: #141010;
  --panel2: #1c1514;
  --line: #3a2927;
  --red: #c5262c;
  --red2: #841318;
  --cream: #fff3dd;
  --muted: #b9ada2;
  --green: #2fa36b;
  --amber: #d68b2b;
  --radius: 20px;
}
* {
  box-sizing: border-box;
}
html {
  color-scheme: dark;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% -10%, #431315 0, transparent 30%), var(--bg);
  color: var(--cream);
  font-family: Inter, Arial, sans-serif;
  min-height: 100vh;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.top {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid #2c2020;
  background: #0c0909dd;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.brand i {
  font-style: normal;
  background: var(--red);
  padding: 10px 9px;
  border-radius: 10px;
  color: white;
}
.brand small {
  display: block;
  color: #9e8f83;
  font-size: 10px;
  letter-spacing: 0.22em;
  margin-top: 3px;
}
.hero {
  max-width: 1180px;
  margin: auto;
  padding: 70px 22px 34px;
}
.eyebrow {
  color: #e44247;
  font-size: 12px;
  letter-spacing: 0.3em;
  font-weight: 900;
  text-transform: uppercase;
}
.hero h1 {
  font:
    700 clamp(42px, 7vw, 82px) / 0.98 Georgia,
    serif;
  margin: 12px 0;
  max-width: 850px;
}
.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 650px;
  line-height: 1.6;
}
.events {
  max-width: 1180px;
  margin: auto;
  padding: 10px 22px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: linear-gradient(160deg, #1b1413, #100d0d);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 410px;
}
.card-img {
  height: 170px;
  background: linear-gradient(135deg, #59191c, #170d0e);
  background-size: cover;
  background-position: center;
  position: relative;
}
.date-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  background: #090707e8;
  border: 1px solid #70403c;
  border-radius: 12px;
  padding: 10px 13px;
  font-weight: 800;
}
.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card h2 {
  font:
    700 28px/1.1 Georgia,
    serif;
  margin: 0 0 10px;
}
.meta {
  color: var(--muted);
  line-height: 1.7;
}
.price {
  font-size: 28px;
  font-weight: 900;
  margin: auto 0 14px;
  padding-top: 24px;
}
.availability {
  font-size: 13px;
  color: #d2c5ba;
  margin-bottom: 14px;
}
.primary,
.secondary,
.danger {
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  font-weight: 900;
}
.primary {
  background: linear-gradient(180deg, #d52e34, #a4161b);
  color: white;
  box-shadow: 0 8px 28px #9b151833;
}
.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.secondary {
  background: #241b1a;
  color: var(--cream);
  border: 1px solid #59403d;
}
.danger {
  background: #481519;
  color: #ffc8ca;
}
.empty,
.status {
  grid-column: 1/-1;
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid #60413d;
  border-radius: 22px;
  padding: 0;
  background: #110d0d;
  color: var(--cream);
  box-shadow: 0 30px 100px #000;
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(4px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  margin: 5px 0 0;
  font:
    700 30px Georgia,
    serif;
}
.icon {
  border: 0;
  background: #2a1c1b;
  color: white;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 24px;
}
.form {
  padding: 24px;
  display: grid;
  gap: 18px;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
label {
  display: grid;
  gap: 8px;
  color: #d8cdc3;
  font-weight: 700;
  font-size: 14px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #553b38;
  background: #0b0909;
  color: white;
  border-radius: 11px;
  padding: 13px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #d9363c;
  box-shadow: 0 0 0 3px #d9363c22;
}
.policy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  line-height: 1.5;
}
.policy input {
  width: 20px;
  margin-top: 3px;
}
.summary {
  padding: 16px;
  border: 1px solid var(--line);
  background: #0b0909;
  border-radius: 12px;
  line-height: 1.7;
}
.message {
  min-height: 20px;
  color: #ff9a9d;
  margin: 0;
}
.busy {
  position: fixed;
  inset: 0;
  background: #080606e8;
  z-index: 100;
  display: grid;
  place-items: center;
  text-align: center;
}
.busy[hidden],
[hidden] {
  display: none !important;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #5b2e2e;
  border-top-color: #e63b41;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: auto auto 12px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.admin {
  max-width: 1220px;
  margin: auto;
  padding: 36px 22px 80px;
}
.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.admin h1 {
  font:
    700 44px Georgia,
    serif;
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px;
}
.stat span {
  color: var(--muted);
  font-size: 13px;
}
.stat strong {
  display: block;
  font-size: 28px;
  margin-top: 8px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}
th,
td {
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
th {
  color: #a99a90;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  background: #30211f;
}
.pill.published,
.pill.paid,
.pill.valid {
  background: #163b2b;
  color: #8de0b6;
}
.pill.draft,
.pill.payment_pending {
  background: #493516;
  color: #f4c66e;
}
.pill.paused,
.pill.expired,
.pill.cancelled {
  background: #421b1e;
  color: #ff9b9e;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions button {
  padding: 8px 10px;
}
.access {
  max-width: 640px;
  margin: auto;
  padding: 28px 18px 70px;
}
.access h1 {
  font:
    700 38px Georgia,
    serif;
}
.scan-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  max-height: 420px;
}
.ticket-result {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
  background: var(--panel2);
}
.ticket-result.valid {
  border-color: #287f59;
}
.ticket-result.used {
  border-color: #a62a30;
}
.ticket-code {
  font-size: 24px;
  font-weight: 900;
}
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.tabs button.active {
  background: var(--red);
}
@media (max-width: 850px) {
  .events {
    grid-template-columns: 1fr 1fr;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .top {
    height: 66px;
    padding: 0 16px;
  }
  .hero {
    padding: 45px 16px 24px;
  }
  .hero h1 {
    font-size: 44px;
  }
  .events {
    grid-template-columns: 1fr;
    padding: 8px 16px 60px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .dialog-head,
  .form {
    padding: 18px;
  }
  .admin {
    padding: 24px 14px;
  }
  .admin-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .admin-head .primary {
    width: 100%;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .actions {
    min-width: 160px;
  }
  .preview-card .card-img {
    height: 210px;
  }
  .preview-actions {
    flex-direction: column-reverse;
  }
  .preview-actions button {
    width: 100%;
  }
}
.event-image-preview {
  height: 240px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #090707;
}
.event-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.draft-notice {
  display: grid;
  gap: 5px;
  padding: 15px 17px;
  border: 1px solid #76531f;
  background: #2b2111;
  border-radius: 12px;
  color: #f8d99a;
}
.draft-notice span,
.status-help {
  font-size: 13px;
  color: #d8c39c;
}
.status-help {
  display: block;
  margin-top: 5px;
  line-height: 1.35;
}
.preview-card {
  max-width: 680px;
}
.preview-card .card-img {
  height: 300px;
}
.preview-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}
