/* Gemeinsames Design fuer alle Ansichten - angelehnt an das Erscheinungsbild
   der bestehenden "Sternsingeraktion St. Dionysius Elsen"-Verwaltung (beiger
   Hintergrund, weisser Kopfbereich mit Logo, gelbe Reiter-Navigation, weisse
   Inhaltskarten, farbige Status-Badges), damit beide Anwendungen fuer die
   Helfer:innen wie aus einem Guss wirken. */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&display=swap');

:root {
  --bg: #e7e0cd;
  --card-bg: #ffffff;
  --tab-gold: #f0bb1c;
  --tab-gold-hover: #e3ad0e;
  --tab-text: #4a3b06;
  --ink: #3d4a5c;
  --ink-soft: #5b6676;
  --accent-yellow: #f3c21a;
  --line: #e4ddc9;
  --green-bg: #dcf3e2; --green-fg: #1d7a3c;
  --amber-bg: #fdecc4; --amber-fg: #96610a;
  --blue-bg: #dbeafe;  --blue-fg: #1d4ed8;
  --grey-bg: #e9e4d6;  --grey-fg: #675c3e;
  --red-bg: #fde0e0;   --red-fg: #a01d1d;
}

* { 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);
}

/* ---------- Kopfbereich mit Logo ---------- */

.brand-header {
  background: #ffffff;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-logo .brand-name {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 40px;
  color: var(--ink);
  line-height: 1;
}

.brand-logo .brand-star {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--accent-yellow);
}

.brand-logo .brand-sub {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 22px;
  color: var(--accent-yellow);
  margin-left: 2px;
  align-self: flex-end;
  padding-bottom: 4px;
}

.brand-header .page-subtitle {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------- Reiter-Navigation (gelb, wie in der Verwaltung) ---------- */

.tabbar {
  display: flex;
  gap: 2px;
  background: var(--tab-gold);
  padding: 0 24px;
  flex-wrap: wrap;
}

.tabbar button, .tabbar a.tab-link {
  appearance: none;
  border: none;
  background: var(--tab-gold);
  color: var(--tab-text);
  font-weight: 700;
  font-size: 13px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.tabbar button:hover, .tabbar a.tab-link:hover {
  background: var(--tab-gold-hover);
}

.tabbar button.active {
  background: var(--card-bg);
  color: var(--ink);
}

.tabbar .spacer { flex: 1 1 auto; background: var(--tab-gold); }

/* ---------- Inhalt ---------- */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px 16px 90px;
}

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

.card h3 {
  margin-top: 0;
}

button, .btn {
  appearance: none;
  border: none;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
}

button.secondary {
  background: #eef0f3;
  color: var(--ink);
}

button.danger {
  background: #a0291d;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input[type="text"], input[type="password"], input[type="tel"], select {
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #cfd3da;
  border-radius: 6px;
}

/* ---------- Status-Badges ---------- */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.live, .badge.angenommen { background: var(--green-bg); color: var(--green-fg); }
.badge.veraltet, .badge.offen { background: var(--amber-bg); color: var(--amber-fg); }
.badge.inaktiv, .badge.erledigt { background: var(--grey-bg); color: var(--grey-fg); }
.badge.wartet_auf_standort, .badge.zugewiesen { background: var(--blue-bg); color: var(--blue-fg); }

#map { height: 420px; border-radius: 8px; }

.hinweis {
  font-size: 13px;
  background: #fff7e0;
  border: 1px solid #f1dca0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.demo-banner {
  background: var(--ink);
  color: white;
  text-align: center;
  padding: 5px;
  font-size: 12px;
}

/* Zeigt technische Fehler sichtbar auf der Seite an, statt dass eine
   Aktion (Button-Klick etc.) kommentarlos nichts tut - wichtig gerade auf
   Mobilgeraeten ohne einfachen Zugriff auf die Entwicklerkonsole. */
.global-error-banner {
  background: #fdecea;
  color: #7a1d12;
  border-bottom: 2px solid #b3261e;
  padding: 10px 16px;
  font-size: 13px;
  text-align: center;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 8px 6px; border-bottom: 2px solid var(--line); color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
tr:nth-child(even) td { background: #fbf9f3; }

/* ---------- Fussleiste (markentreu wie die Spendenstand-Leiste) ---------- */

.brand-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--accent-yellow);
  border-top: 2px solid #d9a90c;
  padding: 8px 16px;
  font-size: 12px;
  color: #4a3b06;
  text-align: center;
}

@media (max-width: 480px) {
  .brand-logo .brand-name { font-size: 32px; }
  .brand-logo .brand-sub { font-size: 18px; }
  main { padding-bottom: 60px; }
}
