:root {
  --bg: #faf7f2;
  --card-bg: #ffffff;
  --border: #eee0d0;
  --accent: #b5651d;
  --accent-hover: #944f16;
  --text: #3a3a3a;
  --text-muted: #7a7a7a;
  --ok-bg: #e6f4ea;
  --ok-text: #256029;
  --warn-bg: #fdecea;
  --warn-text: #a3342a;
  --full-bg: #f3f0ea;
  --accent-soft: #f6e9dc;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  line-height: 1.55;
}

h1 { color: var(--accent); margin-bottom: 4px; }
h2 { margin-top: 0; }
a { color: var(--accent); }

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  text-decoration: none;
  font-size: 14px;
}

.seiten-kopf { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.seiten-kopf h1 { margin-top: 0; }
.text-btn { border: 0; background: transparent; color: var(--accent); padding: 8px 0; font: inherit; cursor: pointer; }
.text-btn:hover { color: var(--accent-hover); text-decoration: underline; }

.karte {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.konzert-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.konzert-link:hover .karte { border-color: var(--accent); }

.konzert-titel { font-size: 18px; font-weight: 600; margin: 0 0 4px; color: var(--text); }
.konzert-meta { color: var(--text-muted); font-size: 14px; }

.konzert-headline {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 10px;
}

.kategorie-titel {
  display: inline-block;
  margin-top: 32px;
  margin-bottom: 12px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}

.aufgabe-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.aufgabe-titel { font-weight: 600; font-size: 16px; }
.aufgabe-zeit { color: var(--text-muted); font-size: 14px; }

.slot-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--ok-bg);
  color: var(--ok-text);
}
.slot-badge.voll {
  background: var(--full-bg);
  color: var(--text-muted);
}

.namen-liste {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}
.namen-liste li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f2ece2;
  font-size: 15px;
}
.namen-liste li:last-child { border-bottom: none; }

.entfernen-btn {
  background: none;
  border: none;
  color: var(--warn-text);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
}
.entfernen-btn:hover { text-decoration: underline; }

.eintragen-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.autocomplete-wrapper {
  position: relative;
  flex: 1;
  min-width: 160px;
}
.autocomplete-wrapper input[type="text"] {
  width: 100%;
}

.eintragen-form input[type="text"] {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
}

.autocomplete-liste {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.autocomplete-eintrag {
  padding: 9px 12px;
  font-size: 15px;
  cursor: pointer;
}
.autocomplete-eintrag:hover,
.autocomplete-eintrag.aktiv {
  background: var(--accent-soft);
}
.eintragen-form button,
.eintragen-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}
.eintragen-form button:hover,
.eintragen-btn:hover { background: var(--accent-hover); }
.eintragen-form button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.hinweis {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  margin-top: 8px;
}
.hinweis.fehler { background: var(--warn-bg); color: var(--warn-text); }
.hinweis.erfolg { background: var(--ok-bg); color: var(--ok-text); }

.login-box { max-width: 420px; margin: 10vh auto 0; }
.login-form { display: flex; gap: 8px; flex-wrap: wrap; }
.login-form input { flex: 1; min-width: 180px; padding: 9px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 15px; }
.login-form button, body > form button {
  background: var(--accent); color: #fff; border: none; padding: 9px 16px;
  border-radius: 6px; cursor: pointer; font-size: 15px;
}
.login-form button:hover, body > form button:hover { background: var(--accent-hover); }
.button-link { display: inline-block; margin-top: 8px; }

.admin-seite { max-width: 880px; }
.admin-kopf { padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.admin-titelzeile, .bereich-kopf, .admin-karte, .admin-karte-inhalt { display: flex; justify-content: space-between; gap: 16px; }
.admin-titelzeile { align-items: center; }
.admin-titelzeile h1 { margin: 0; font-size: 32px; }
.admin-titelzeile p { margin: 4px 0 0; }
.admin-ueberzeile { margin: 0; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .09em; }
.admin-inhalt { display: grid; gap: 42px; margin-top: 34px; }
.bereich-kopf { align-items: end; margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.bereich-kopf h2 { margin: 2px 0; color: var(--text); font-size: 24px; }
.bereich-kopf p { margin-bottom: 0; }
.admin-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.admin-form[hidden] { display: none; }
.eingabe-karte { border-color: #e8c9ad; background: #fffaf4; box-shadow: 0 5px 18px rgba(111, 67, 28, .08); }
.form-kopf { padding: 2px 0 12px; border-bottom: 1px solid var(--border); }
.form-kopf h3 { margin: 0; font-size: 17px; color: var(--accent); }
.form-kopf p { margin: 3px 0 0; color: var(--text-muted); font-size: 14px; }
.form-felder { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--card-bg); }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; padding: 10px 11px; border: 1px solid #d8cfc4; border-radius: 7px; background: #fffdfa; color: var(--text); font: inherit; font-weight: 400; }
.admin-form textarea { resize: vertical; }
.volle-breite, .admin-form-aktionen { grid-column: 1 / -1; }
.feld-hilfe { font-weight: 400; color: var(--text-muted); }
.admin-form-aktionen { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.admin-kartenliste { display: grid; gap: 10px; }
.admin-karte { align-items: center; margin: 0; padding: 14px 16px; border-left: 4px solid #ead2bd; box-shadow: 0 2px 8px rgba(82, 54, 30, .04); }
.admin-karte:hover { border-color: #e1c2a4; }
.admin-karte-inhalt { align-items: flex-start; justify-content: flex-start; }
.admin-karte h3 { margin: 0; font-size: 16px; }
.admin-karte p { margin: 2px 0 0; }
.datum-chip { display: grid; min-width: 74px; min-height: 38px; place-items: center; padding: 4px 8px; border-radius: 8px; background: var(--ok-bg); color: var(--ok-text); font-size: 12px; font-weight: 700; }
.admin-nebeninfo { display: inline-block; margin-top: 6px !important; padding: 2px 8px; border-radius: 999px; background: var(--full-bg); color: var(--text-muted); font-size: 12px; }
.admin-buttons { display: flex; flex-shrink: 0; gap: 6px; }
@media (max-width: 600px) {
  body { padding: 18px 14px 42px; }
  .admin-titelzeile h1 { font-size: 28px; }
  .admin-titelzeile { gap: 10px; }
  .bereich-kopf { padding: 14px; }
  .bereich-kopf { align-items: flex-start; flex-direction: column; }
  .admin-form { grid-template-columns: 1fr; padding: 15px; }
  .form-felder { grid-template-columns: 1fr; padding: 14px; }
  .admin-karte { align-items: stretch; flex-direction: column; }
  .admin-buttons { width: 100%; }
  .datum-chip { min-width: 66px; }
}

.leer-hinweis { color: var(--text-muted); font-style: italic; }
