:root {
  --bg: #f4f7f5;
  --ink: #18201f;
  --muted: #62706c;
  --line: #d8e0dd;
  --panel: #ffffff;
  --green: #0f7c5c;
  --green-dark: #07583f;
  --blue: #2563eb;
  --amber: #c46a0a;
  --red: #bf3030;
  --violet: #6d48b5;
  --shadow: 0 10px 30px rgba(24, 32, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(15, 124, 92, 0.12) 0, rgba(244, 247, 245, 0) 320px),
    var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 24px 10px;
}

.back-link,
.menu-button,
.primary-button,
.ghost-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.back-link,
.menu-button {
  color: var(--green-dark);
  background: #e5f4ee;
}

.nav-menu {
  position: relative;
  z-index: 20;
}

.menu-button {
  gap: 8px;
  list-style: none;
  min-width: 46px;
}

.menu-button::-webkit-details-marker {
  display: none;
}

.burger-lines {
  display: grid;
  gap: 4px;
}

.burger-lines span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-label {
  font-size: 0.9rem;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(340px, 92vw);
  display: none;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(24, 32, 31, 0.16);
}

.nav-menu[open] .menu-panel {
  display: grid;
}

.menu-section {
  display: grid;
  gap: 6px;
}

.menu-section strong {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.menu-panel a {
  min-height: 34px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.menu-panel a:hover {
  background: #eef3f1;
}

.menu-panel a.muted-link {
  color: rgba(24, 32, 31, 0.52);
  background: #f7faf8;
}

.primary-button {
  color: #fff;
  background: var(--green);
}

.amber-button {
  background: var(--amber);
}

.ghost-button {
  color: var(--green-dark);
  background: #fff;
  border-color: var(--line);
}

.primary-button:hover,
.back-link:hover,
.menu-button:hover,
.ghost-button:hover {
  filter: brightness(0.95);
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

h2 {
  font-size: 1.22rem;
}

.event-pill {
  display: grid;
  gap: 2px;
  justify-items: end;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.event-pill span {
  color: var(--muted);
  font-size: 0.85rem;
}

.dashboard-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 14px 24px 48px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  min-height: 250px;
  align-items: stretch;
  padding: 36px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(7, 88, 63, 0.95), rgba(37, 99, 235, 0.74)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='360' viewBox='0 0 900 360'%3E%3Crect width='900' height='360' fill='%230f7c5c'/%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.27' stroke-width='6'%3E%3Cpath d='M70 64 H830 M70 124 H830 M70 184 H830 M70 244 H830 M70 304 H830'/%3E%3Cpath d='M140 30 V330 M310 30 V330 M480 30 V330 M650 30 V330 M820 30 V330'/%3E%3Ccircle cx='210' cy='112' r='32'/%3E%3Ccircle cx='700' cy='235' r='24'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.82'%3E%3Cpath d='M700 72 h94 a12 12 0 0 1 12 12 v82 a12 12 0 0 1-12 12 h-94 a12 12 0 0 1-12-12 v-82 a12 12 0 0 1 12-12z'/%3E%3Cpath d='M716 100 h62 v8 h-62zM716 122 h44 v8 h-44zM716 144 h70 v8 h-70z' fill='%2307583f' fill-opacity='.38'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: var(--shadow);
}

.hero-copy {
  max-width: 760px;
}

.hero-copy .eyebrow {
  color: #d6fff1;
}

.hero-copy h2 {
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

.hero-copy p:last-child {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-status {
  align-self: end;
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-status span,
.hero-status small {
  color: rgba(255, 255, 255, 0.82);
}

.hero-status strong {
  font-size: 1.4rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.kpi,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.kpi {
  display: grid;
  gap: 4px;
  padding: 18px;
}

.kpi-label,
.kpi small,
.copy-status {
  color: var(--muted);
}

.kpi strong {
  font-size: 2rem;
}

.focus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
}

.wide {
  grid-column: 1 / -1;
}

.form-actions,
.table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-actions .primary-button,
.form-actions .ghost-button {
  flex: 1 1 180px;
}

.table-tools {
  justify-content: flex-end;
}

.table-tools-row {
  margin-bottom: 14px;
}

.table-tools select {
  width: 190px;
}

.table-tools input {
  width: min(360px, 100%);
}

.alpha-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.alpha-filter button {
  min-width: 36px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
  cursor: pointer;
  font-weight: 800;
}

.alpha-filter button.active {
  color: #fff;
  background: var(--green);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-summary {
  margin-bottom: 14px;
  cursor: pointer;
  list-style: none;
}

.table-summary::-webkit-details-marker {
  display: none;
}

.table-summary::after {
  content: "Einklappen";
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--green-dark);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

details:not([open]) .table-summary {
  margin-bottom: 0;
}

details:not([open]) .table-summary::after {
  content: "Aufklappen";
}

table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #f7faf8;
  font-size: 0.82rem;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr.angemeldet {
  box-shadow: inset 4px 0 0 var(--green);
}

tr.abgemeldet {
  color: #6c3030;
  background: rgba(191, 48, 48, 0.05);
  box-shadow: inset 4px 0 0 var(--red);
}

tr.rueckgabe {
  color: #6a3b08;
  background: rgba(196, 106, 10, 0.06);
  box-shadow: inset 4px 0 0 var(--amber);
}

tr.nachruecker {
  box-shadow: inset 4px 0 0 var(--amber);
}

tr.offen {
  box-shadow: inset 4px 0 0 var(--blue);
}

tr.angefragt {
  box-shadow: inset 4px 0 0 var(--amber);
}

tr.positive {
  box-shadow: inset 4px 0 0 var(--green);
}

.team-name {
  display: grid;
  gap: 3px;
}

.team-name small,
.muted {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.neutral {
  color: var(--green-dark);
  background: #e5f4ee;
}

.badge.offen {
  background: var(--blue);
}

.badge.angemeldet,
.badge.paid,
.badge.positive {
  background: var(--green);
}

.badge.abgemeldet,
.badge.open {
  background: var(--red);
}

.badge.rueckgabe {
  background: var(--amber);
}

.badge.nachruecker {
  background: var(--amber);
}

.badge.angefragt {
  background: var(--amber);
}

.level-pill {
  display: inline-flex;
  max-width: 220px;
  min-height: 28px;
  align-items: center;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--ink);
  background: #eef3f1;
  font-size: 0.84rem;
  font-weight: 700;
}

.payment-amount {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  margin-left: 6px;
  padding: 0 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.payment-amount.paid {
  color: var(--green-dark);
}

.payment-amount.open {
  color: var(--red);
}

.teilnehmer-input {
  width: 82px;
}

.waitlist-status {
  min-width: 190px;
}

.compact-button {
  min-height: 34px;
  padding-inline: 10px;
}

.mini-link {
  display: inline-flex;
  margin-top: 5px;
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

.mini-link:hover {
  text-decoration: underline;
}

.hidden {
  display: none;
}

@media (max-width: 1100px) {
  .hero-band,
  .focus-grid {
    grid-template-columns: 1fr;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    grid-template-columns: 1fr;
    padding-inline: 14px;
  }

  .event-pill {
    justify-items: start;
  }

  .dashboard-shell {
    padding-inline: 14px;
  }

  .hero-band {
    padding: 24px;
  }

  .kpi-grid,
  .entry-form {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-tools {
    justify-content: flex-start;
    width: 100%;
  }

  .table-tools select,
  .table-tools input {
    width: 100%;
  }
}
