/* reklamiere.de — Design v2 — Professionell, kein Emoji */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Sora:wght@600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --marine:    #1a3a5c;
  --marine-d:  #112640;
  --blau:      #2563eb;
  --blau-h:    #1d4ed8;
  --weiss:     #ffffff;
  --hintergrund: #f4f6fb;
  --grau-l:    #e8ecf4;
  --grau-m:    #9aa5bc;
  --grau-d:    #4a5568;
  --text:      #1a2b4a;
  --gruen:     #16a34a;
  --rot:       #dc2626;
  --karte:     #ffffff;
  --border:    #dde3ef;

  --serif:  'Sora', Georgia, serif;
  --sans:   'Inter', system-ui, sans-serif;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(26,58,92,0.08), 0 1px 2px rgba(26,58,92,0.04);
  --shadow-m: 0 4px 16px rgba(26,58,92,0.10);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--hintergrund);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navigation ─────────────────────────────────────────────── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  height: 64px;
  background: var(--weiss);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.logo {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--marine);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { color: var(--blau); }

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--weiss);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover { border-color: var(--marine); color: var(--marine); background: var(--hintergrund); }

.btn.primaer {
  background: var(--marine);
  color: var(--weiss);
  border-color: var(--marine);
}
.btn.primaer:hover { background: var(--marine-d); border-color: var(--marine-d); color: var(--weiss); }

.btn.blau {
  background: var(--blau);
  color: var(--weiss);
  border-color: var(--blau);
}
.btn.blau:hover { background: var(--blau-h); border-color: var(--blau-h); color: var(--weiss); }

.btn.sekundaer { background: var(--hintergrund); color: var(--grau-d); }
.btn.sekundaer:hover { background: var(--grau-l); color: var(--text); }

.btn.gefahr { border-color: var(--rot); color: var(--rot); }
.btn.gefahr:hover { background: var(--rot); color: var(--weiss); }

.btn-voll { display: flex; width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Formulare ──────────────────────────────────────────────── */
.form-gruppe { margin-bottom: 1.125rem; }
.form-gruppe label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--grau-d);
  margin-bottom: 0.375rem;
}
.form-gruppe small { display: block; font-size: 0.78rem; color: var(--grau-m); margin-top: 0.3rem; }

input, select, textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.9rem;
  background: var(--weiss);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blau);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa5bc' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }

/* ── Karten ─────────────────────────────────────────────────── */
.karte {
  background: var(--karte);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.karte-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.karte-body { padding: 1.5rem; }
.karte-titel { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--marine); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
}
.badge.gruen  { background: #dcfce7; color: #15803d; }
.badge.grau   { background: var(--grau-l); color: var(--grau-d); }
.badge.rot    { background: #fee2e2; color: var(--rot); }
.badge.blau   { background: #dbeafe; color: #1d4ed8; }
.badge.marine { background: #e0e8f4; color: var(--marine); }

/* ── Meldungen ──────────────────────────────────────────────── */
.meldung {
  display: none;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border-left: 3px solid;
}
.meldung.erfolg { background: #f0fdf4; border-color: var(--gruen); color: #15803d; }
.meldung.fehler { background: #fef2f2; border-color: var(--rot); color: var(--rot); }
.meldung.sichtbar { display: block; }

/* ── Seiten-Layout ──────────────────────────────────────────── */
.seite { max-width: 640px; margin: 0 auto; padding: 2.5rem 1.5rem; flex: 1; }
.seite-breit { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; flex: 1; }
.seite-titel {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--marine);
  margin-bottom: 0.3rem;
  line-height: 1.2;
}
.seite-untertitel { color: var(--grau-m); font-size: 0.9rem; margin-bottom: 2rem; }

/* ── Tabellen ───────────────────────────────────────────────── */
.tabelle-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead { background: var(--hintergrund); }
th {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grau-m);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--grau-l);
  color: var(--text);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--hintergrund); }

/* ── Admin Sidebar ──────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 230px;
  min-height: 100vh;
  background: var(--marine);
  padding: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  display: block;
  padding: 1.25rem 1.5rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--weiss);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  letter-spacing: -0.02em;
}
.sidebar-logo span { color: #60a5fa; }
.sidebar-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
  padding: 1.25rem 1.5rem 0.5rem;
}
.sidebar nav { padding: 0.5rem 0.75rem; flex: 1; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: all 0.12s;
  margin-bottom: 1px;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.08); color: var(--weiss); }
.sidebar nav a.aktiv { background: rgba(255,255,255,0.12); color: var(--weiss); font-weight: 500; }
.sidebar-trenner { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 0.5rem 0.75rem; }
.sidebar-bottom {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.haupt { flex: 1; overflow-y: auto; padding: 2rem; background: var(--hintergrund); }

/* ── Statistik Karten ───────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-karte {
  background: var(--weiss);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.stat-zahl { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--marine); letter-spacing: -0.03em; line-height: 1; }
.stat-label { font-size: 0.78rem; color: var(--grau-m); margin-top: 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(26,42,75,0.45);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-bg.offen { display: flex; }
.modal {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--shadow-m);
  width: min(680px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--weiss);
}
.modal-titel { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--marine); }
.modal-body { padding: 1.5rem; }
.modal-fuss {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--hintergrund);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Fortschrittsanzeige ────────────────────────────────────── */
.fortschritt { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.fortschritt-schritt {
  flex: 1;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--grau-m);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.fortschritt-schritt.aktiv { color: var(--blau); border-bottom-color: var(--blau); }
.fortschritt-schritt.fertig { color: var(--gruen); border-bottom-color: var(--gruen); }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--weiss);
}
.footer-logo { font-family: var(--serif); font-size: 1rem; font-weight: 700; color: var(--marine); text-decoration: none; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.82rem; color: var(--grau-m); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ── Leer-Zustand ───────────────────────────────────────────── */
.leer { text-align: center; padding: 3rem 2rem; color: var(--grau-m); }
.leer p { margin-bottom: 1.5rem; font-size: 0.9rem; }
.laden { display: flex; align-items: center; justify-content: center; padding: 2.5rem; color: var(--grau-m); font-size: 0.875rem; gap: 0.5rem; }

/* ── Trennlinie ─────────────────────────────────────────────── */
hr.trenner { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ── Hinweis-Box ────────────────────────────────────────────── */
.hinweis {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 0.82rem;
  color: #1d4ed8;
  margin-bottom: 1rem;
}
.hinweis code {
  background: rgba(37,99,235,0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.85em;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .seite, .seite-breit { padding: 1.5rem 1rem; }
  .haupt { padding: 1.25rem; }
  footer { flex-direction: column; text-align: center; }
  .sidebar { width: 200px; }
}

@media (max-width: 640px) {
  .sidebar { display: none; }
  .admin-layout .haupt { padding: 1rem; }
}
