/* Lokale Schriftart statt CDN-Einbindung.
   Lege Woff2-Dateien unter /public/fonts/ ab, falls gewünscht,
   z. B. Inter-Regular.woff2 und Inter-SemiBold.woff2.
   Bis dahin greift der System-Font-Stack. */
@font-face {
  font-family: 'AppFont';
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'AppFont';
  src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #f5efe2;           /* hellbeige */
  --bg-card: #ffffff;
  --accent: #9fd3e8;       /* hellblau */
  --accent-strong: #6fb8d6;
  --text: #2b2b2b;
  --text-muted: #6b6b6b;
  --border: #e3dcc9;
  --danger: #d98282;
  --success: #7fb87f;
  --gastgeber: #e0b568;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
}

[data-theme="dark"] {
  --bg: #1e222a;
  --bg-card: #272c36;
  --accent: #4f8aa8;
  --accent-strong: #6fb8d6;
  --text: #eae6da;
  --text-muted: #a3a3a3;
  --border: #383e4a;
  --danger: #c96b6b;
  --success: #6ba46b;
  --gastgeber: #c99a4d;
  --shadow: 0 2px 10px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'AppFont', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.2s ease, color 0.2s ease;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.topbar h1 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin-top: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

input[type="password"], input[type="text"], input[type="date"], input[type="time"], select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent-strong);
  color: #fff;
  width: 100%;
}
.btn:active { opacity: 0.85; }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.error-msg {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 8px;
  min-height: 1.1em;
}

.option-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.option-btn {
  flex: 1 1 30%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.option-btn.active[data-status="kommt"] { background: var(--success); border-color: var(--success); color: #fff; }
.option-btn.active[data-status="kommt_nicht"] { background: var(--danger); border-color: var(--danger); color: #fff; }
.option-btn.active[data-status="gastgeber"] { background: var(--gastgeber); border-color: var(--gastgeber); color: #fff; }

.member-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.member-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.member-list li:last-child { border-bottom: none; }

.badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  color: #fff;
}
.badge.kommt { background: var(--success); }
.badge.kommt_nicht { background: var(--danger); }
.badge.gastgeber { background: var(--gastgeber); }
.badge.offen { background: var(--text-muted); }

.select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.select-item {
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  font-size: 1rem;
}
.select-item:active { background: var(--accent); }

.meeting-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meeting-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.meeting-row label {
  flex: 0 0 90px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.history-entry {
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 0.92rem;
}
.history-entry:last-child { border-bottom: none; }

.top-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
}

canvas { max-width: 100%; }

.hidden { display: none !important; }
