:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #6b7280;
  --accent: #c8102e;
  --accent-dark: #a50d26;
  --border: #d9dee6;
  --ok-bg: #e7f6ed;
  --ok-ink: #166534;
  --err-bg: #fdecec;
  --err-ink: #b42318;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

/* ── Hero / Kopfbereich ───────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1c2430 0%, #2c3a4d 60%, #344459 100%);
  padding: 30px 20px 70px;
  text-align: center;
}

.hero-inner { max-width: 620px; margin: 0 auto; }

/* Titelbild */
.hero-img {
  width: 100%;
  max-width: 540px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin: 0 auto 18px;
  border-radius: 12px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 27px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.hero-subtitle {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

/* ── Anmeldeformular ──────────────────────────────── */
.card {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: -44px auto 40px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px 34px 28px;
  box-shadow: 0 10px 30px rgba(20, 30, 50, 0.12);
}

/* Karo-Streifen (Motorsport-Akzent) am oberen Kartenrand */
.checkers {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 13px 13px 0 0;
  background:
    repeating-conic-gradient(#1c2430 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px;
}

.card-title {
  margin: 0 0 20px;
  font-size: 19px;
  font-weight: 700;
}

/* ── Leistungen / Paket ───────────────────────────── */
.package {
  background: #f7f8fa;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 26px;
}

.package-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.package-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.package-list li {
  position: relative;
  padding: 5px 0 5px 26px;
  font-size: 15px;
}

.package-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 16px;
  height: 9px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

.package-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.package-price span {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.package-price strong {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.package-price small {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.package-note {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

h1 {
  margin: 0 0 4px;
  font-size: 24px;
}

.event-meta {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.field { margin-bottom: 16px; }
.row { display: flex; gap: 14px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.req { color: var(--accent); }

input, select {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

select { height: 44px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

button {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s;
}

button:hover { background: var(--accent-dark); }
button:disabled { opacity: .6; cursor: default; }

.hint { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

.message {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 9px;
  font-size: 15px;
}
.message.ok { background: var(--ok-bg); color: var(--ok-ink); }
.message.error { background: var(--err-bg); color: var(--err-ink); }

/* ── Galerie ──────────────────────────────────────── */
.gallery {
  max-width: 540px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.gallery-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
  margin: 0 0 14px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(20, 30, 50, 0.12);
}

@media (max-width: 460px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid img { aspect-ratio: 4 / 3; }
}

/* ── Admin ────────────────────────────────────────── */
body.admin { background: var(--bg); }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 28px auto 16px;
  padding: 0 24px;
}

.admin-actions { display: flex; align-items: center; gap: 16px; }
.count { color: var(--muted); font-size: 14px; }

.btn {
  display: inline-block;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
}
.btn:hover { background: var(--accent-dark); }

.table-wrap {
  max-width: 1100px;
  margin: 0 auto 40px;
  padding: 0 24px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

th { background: #f0f2f5; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }
td.empty { text-align: center; color: var(--muted); padding: 30px; }

.btn-delete {
  width: auto;
  margin: 0;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.btn-delete:hover {
  background: var(--err-bg);
  border-color: var(--accent);
  color: var(--accent-dark);
}
