/* ── Variablen ────────────────────────────────────────────────────────────── */
:root {
  --primary:    #2c3e50;
  --accent:     #c0845a;
  --bg:         #faf8f5;
  --card-bg:    #ffffff;
  --text:       #2c3e50;
  --text-light: #7a7a7a;
  --border:     #e8e2d9;
  --success:    #2e7d52;
  --danger:     #c0392b;
  --info-bg:    #eef3fb;
  --info-text:  #2c4a7a;
}

/* ── Reset & Basis ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; }
h1, h2, h3, h4 { color: var(--primary); }

a { color: var(--accent); }

code {
  background: #f0ece6;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
nav {
  background: var(--primary);
  color: white;
  padding: 0.9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-brand { font-weight: 600; font-size: 1.05rem; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#nav-user {
  font-size: 0.85rem;
  opacity: 0.75;
}

.nav-link {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
}
.nav-link:hover { color: white; }

.btn-nav {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-family: inherit;
  transition: background 0.2s;
}
.btn-nav:hover { background: rgba(255,255,255,0.22); }

/* ── Hauptbereich ─────────────────────────────────────────────────────────── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

/* ── Login-Seite ──────────────────────────────────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
}

.login-box {
  background: var(--card-bg);
  padding: 2.5rem 2rem;
  border-radius: 18px;
  box-shadow: 0 6px 30px rgba(0,0,0,0.09);
  width: 100%;
  max-width: 380px;
}

.login-logo {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-box h1 {
  text-align: center;
  margin-bottom: 0.25rem;
}

.subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.form-switch {
  text-align: center;
  margin-top: 1.1rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* ── Formular-Elemente ────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-size: 0.975rem;
  font-family: inherit;
  color: var(--text);
  background: #fdfcfa;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192,132,90,0.12);
  background: white;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.hint {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 9px;
  border: none;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover   { opacity: 0.87; }
.btn:active  { transform: scale(0.98); }

.btn-primary { background: var(--primary); color: white; }
.btn-accent  { background: var(--accent);  color: white; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-danger  { background: var(--danger);  color: white; }
.btn-success { background: var(--success); color: white; }

.btn-full { width: 100%; }
.btn-sm   { padding: 5px 13px; font-size: 0.83rem; }

.btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 9px;
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert-error   { background: #fdf2f1; color: var(--danger);  border: 1px solid #f3c0bb; }
.alert-info    { background: var(--info-bg); color: var(--info-text); border: 1px solid #c5d5ef; }
.alert-success { background: #edf7f1; color: var(--success); border: 1px solid #b3dfc5; }

/* ── Karten ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.055);
  border: 1px solid var(--border);
}

.card h3 { margin-bottom: 1.25rem; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.tab {
  padding: 0.7rem 1.3rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-light);
  transition: color 0.2s;
}

.tab:hover  { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ── Abschnittskopf ───────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

/* ── Mitglieder-Raster ────────────────────────────────────────────────────── */
.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 1.5rem;
}

.member-card {
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.member-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.member-photo-placeholder {
  height: 190px;
  background: #f0ece6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.member-info  { padding: 1rem 1.1rem 1.25rem; }
.member-info h3 { margin-bottom: 0.2rem; font-size: 1rem; }
.member-role  { color: var(--accent); font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; }
.member-bday  { color: var(--text-light); font-size: 0.8rem; margin-bottom: 0.4rem; }
.member-bio   { color: var(--text-light); font-size: 0.83rem; margin-top: 0.4rem; line-height: 1.5; }

/* ── Zeitleiste ───────────────────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.75rem;
}

.timeline-dot {
  position: absolute;
  left: -2.15rem;
  top: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.timeline-date { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.25rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.timeline-card h4 { margin-bottom: 0.3rem; }
.timeline-desc { font-size: 0.9rem; color: var(--text-light); margin-top: 0.25rem; }
.timeline-img  { width: 100%; border-radius: 9px; margin-top: 0.85rem; display: block; }
.timeline-by   { font-size: 0.75rem; color: #bbb; margin-top: 0.6rem; }

/* ── Admin-Listen ─────────────────────────────────────────────────────────── */
.list-container { margin-top: 0; }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }

.meta { font-size: 0.82rem; color: var(--text-light); }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f0ece6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 5px;
}

.badge-pending  { background: #fff3cd; color: #856404; }
.badge-approved { background: #d6f0e0; color: #1a5c35; }
.badge-admin    { background: #dce8ff; color: #1a3a7a; }

/* ── Hilfstexte ───────────────────────────────────────────────────────────── */
.loading-text { color: var(--text-light); font-size: 0.9rem; padding: 0.5rem 0; }
.empty-text   { color: var(--text-light); font-size: 0.9rem; padding: 0.5rem 0; }

/* ── Abstände ─────────────────────────────────────────────────────────────── */
.mt-2 { margin-top: 1.25rem; }
.mt-3 { margin-top: 2rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  main { padding: 1.25rem 1rem; }

  .members-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .nav-right #nav-user { display: none; }

  .list-row { flex-wrap: wrap; }

  .login-box { padding: 2rem 1.25rem; }
}
