/**
 * app.css
 * Demokratie-Netzwerk – Design angelehnt an das Bündnis-Netzwerk (buendnisost.de):
 * helle neutrale Palette, Inter, klare Karten, Pill-Buttons.
 * Der Regenbogen-Streifen bleibt als Markenzeichen erhalten.
 */

* { box-sizing: border-box; }

/* [hidden] muss jede spätere display-Regel (z.B. .nav-wrap{display:flex}) schlagen */
[hidden] { display: none !important; }

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --pink: #ec4899;
  --pink-dark: #db2777;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --purple: #a855f7;
  --purple-dark: #7e22ce;
  --amber: #eab308;
  --tan-bg: #faf3e8;
  --tan-text: #92702c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(17,24,39,.04), 0 1px 3px rgba(17,24,39,.06);
  --shadow-hover: 0 10px 24px rgba(17,24,39,.08);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; font-weight: 600; }
a:hover { color: var(--pink); text-decoration: underline; }
input, textarea, select { font-family: inherit; }
::selection { background: #fde68a; }

h1, h2, h3 { font-family: 'Inter', sans-serif; margin: 0; letter-spacing: -0.01em; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.rainbow-stripe { display: flex; height: 6px; width: 100%; flex-shrink: 0; }
.rainbow-stripe span { flex: 1; }

/* Navigation */
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.nav-left { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 800; font-size: 18px; color: var(--text); }
.nav-links { display: flex; gap: 4px; background: var(--bg); border-radius: 999px; padding: 4px; }
.nav-links a { font-weight: 600; color: var(--text-muted); font-size: 14px; padding: 8px 16px; border-radius: 999px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { background: var(--surface); color: var(--pink); box-shadow: var(--shadow); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-org-name { font-size: 14px; color: var(--text-muted); font-weight: 500; }

/* Buttons */
.btn {
  border: none; border-radius: 999px; padding: 11px 22px;
  font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: background .12s, transform .12s;
}
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); }
.btn-outline { background: var(--surface); color: var(--teal); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--teal-light); background: #f0fdfa; }
.btn-outline-purple { background: var(--surface); color: var(--purple-dark); border: 1.5px solid var(--border); }
.btn-outline-purple:hover { border-color: var(--purple); background: #faf5ff; }
.btn-plain { background: transparent; color: var(--text); border: none; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn-plain:hover { background: var(--bg); }
.btn-teal { background: var(--teal-light); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px; font-weight: 700; cursor: pointer; width: 100%; }
.btn-teal:hover { background: var(--teal); }
.btn-purple { background: var(--purple); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px; font-weight: 700; cursor: pointer; width: 100%; }
.btn-purple:hover { background: var(--purple-dark); }
.btn-disabled { width: 100%; background: var(--bg); color: var(--text-faint); border: none; border-radius: var(--radius-sm); padding: 10px; font-weight: 700; }
.btn-danger-text { background: transparent; color: var(--pink-dark); border: none; font-weight: 700; cursor: pointer; padding: 6px 10px; border-radius: 999px; font-size: 13px; }
.btn-danger-text:hover { background: #fce7f3; }
.btn-teal-text { background: transparent; color: var(--teal); border: none; font-weight: 700; cursor: pointer; padding: 6px 10px; border-radius: 999px; font-size: 13px; }
.btn-teal-text:hover { background: #f0fdfa; }
.btn-green { background: #16a34a; color: #fff; border: none; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; cursor: pointer; }
.btn-green:hover { background: #15803d; }
.btn-reject { background: transparent; color: #dc2626; border: none; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; cursor: pointer; }
.btn-reject:hover { background: #fee2e2; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn:disabled { cursor: default; }

/* Layout helpers */
.page-pad { padding: 40px 48px; flex: 1; max-width: 1200px; margin: 0 auto; width: 100%; }
.page-pad-narrow { padding: 40px 48px; flex: 1; max-width: 760px; margin: 0 auto; width: 100%; }
.page-pad-medium { padding: 40px 48px; flex: 1; max-width: 1100px; margin: 0 auto; width: 100%; }
.center-page { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px; }

/* Eyebrow + section header pattern */
.eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pink); margin-bottom: 6px; }
.section-head-lg { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head-lg h2 { font-size: 24px; font-weight: 800; }
.section-head-lg .sub { color: var(--text-muted); margin-top: 4px; font-size: 14px; }
.section-link { font-weight: 700; font-size: 14px; white-space: nowrap; }

/* Login / Register */
.auth-box { max-width: 640px; width: 100%; }
.hero-banner {
  padding: 48px 40px; background: linear-gradient(120deg,#ef4444,#f97316,#eab308,#22c55e,#14b8a6,#3b82f6,#a855f7,#ec4899);
  color: #fff; border-radius: 24px; margin-bottom: 32px;
}
.hero-banner h1 { font-size: 34px; font-weight: 800; margin: 0 0 10px; }
.hero-banner p { margin: 0; opacity: .95; font-size: 16px; line-height: 1.5; }

/* Home hero (öffentliche Startseite) */
.home-hero {
  background: linear-gradient(120deg,#ef4444,#f97316,#eab308,#22c55e,#14b8a6,#3b82f6,#a855f7,#ec4899);
  border-radius: 24px; padding: 44px 40px; color: #fff; margin-bottom: 40px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.home-hero .eyebrow { color: rgba(255,255,255,.85); }
.home-hero h1 { font-size: 32px; font-weight: 800; margin: 0 0 10px; max-width: 560px; }
.home-hero p { margin: 0; opacity: .95; font-size: 15px; line-height: 1.55; max-width: 520px; }
.home-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.home-hero .btn-primary { background: #fff; color: var(--pink-dark); }
.home-hero .btn-primary:hover { background: #fce7f3; }
.home-hero .btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.home-hero .btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--surface); color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--purple); outline: none; }
.field-error { color: #dc2626; font-size: 13px; font-weight: 700; margin: 0 0 12px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row-zip { display: grid; grid-template-columns: 120px 1fr; gap: 16px; margin-bottom: 16px; }

/* Dashboard header / stats */
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.dash-title p { margin: 0; color: var(--text-muted); font-weight: 500; }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 36px; }
.stat-card { padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-card .num { font-size: 32px; font-weight: 800; color: var(--text); }
.stat-card .label { color: var(--text-muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.stat-card.accent-pink { border-top: 3px solid var(--pink); }
.stat-card.accent-blue { border-top: 3px solid #3b82f6; }
.stat-card.accent-purple { border-top: 3px solid var(--purple); }

/* Pending orgs */
.pending-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 20px; margin-bottom: 28px; }
.pending-box h2 { font-size: 16px; font-weight: 800; margin: 0 0 4px; color: #78350f; }
.pending-box > p { font-size: 13px; color: #92702c; margin: 0 0 14px; }
.pending-item { background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; box-shadow: var(--shadow); }
.pending-item .name { font-weight: 700; }
.pending-item .meta { font-size: 12px; color: var(--text-muted); }
.pending-actions { display: flex; gap: 8px; }
.pending-list { display: flex; flex-direction: column; gap: 10px; }

/* View toggle (Liste / Kalender / Sortierung) */
.section-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.toggle-group { display: flex; gap: 4px; background: var(--bg); border-radius: 999px; padding: 4px; }
.toggle-group button { border: none; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; cursor: pointer; background: transparent; color: var(--text-muted); }
.toggle-group button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
thead th { padding: 14px 16px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 1px solid var(--border); text-align: left; font-weight: 700; }
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
tbody tr:last-child td { border-bottom: none; }
tbody td.title-cell { font-weight: 700; cursor: pointer; color: var(--text); }
tbody td.actions-cell { text-align: right; white-space: nowrap; }
.empty-hint { color: var(--text-muted); }

/* Calendar */
.calendar-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calendar-head .month-label { font-weight: 800; font-size: 16px; text-transform: capitalize; }
.calendar-nav-btn { border: none; background: var(--bg); border-radius: var(--radius-sm); padding: 8px 14px; font-weight: 700; cursor: pointer; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; margin-bottom: 6px; }
.weekday-label { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 4px 0; }
.day-cell { min-height: 74px; border-radius: var(--radius-sm); background: var(--bg); padding: 6px; }
.day-num { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.day-events { display: flex; flex-direction: column; gap: 3px; }
.day-event { cursor: pointer; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-more { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* Overview filters */
.filter-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-row input[type=text] { flex: 1; min-width: 240px; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; background: var(--surface); color: var(--text); }
.filter-row input[type=text]:focus { border-color: var(--purple); outline: none; }
.sort-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.sort-row .sort-label { font-size: 13px; font-weight: 700; color: var(--text-muted); }
.location-btn { border: 1.5px solid var(--purple); background: var(--surface); color: var(--purple-dark); border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13px; cursor: pointer; }
.location-status { font-size: 13px; color: var(--text-muted); }
.location-error { font-size: 13px; color: #dc2626; }
.online-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.online-track { width: 36px; height: 20px; border-radius: 999px; background: #d1d5db; position: relative; display: inline-block; transition: background .15s; }
.online-track.on { background: #16a34a; }
.online-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: transform .15s; display: block; }
.online-track.on .online-thumb { transform: translateX(16px); }
.online-label { font-size: 13px; font-weight: 700; }
.tag-filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }

/* Tag pills */
.tag-pill { cursor: pointer; border: none; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 13px; }
.tag-static { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.tag-static-lg { display: inline-block; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; }
.org-pill { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; background: var(--tan-bg); color: var(--tan-text); }

/* Event cards */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 20px; }
.event-card { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: box-shadow .15s, transform .15s; cursor: pointer; box-shadow: var(--shadow); }
.event-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.event-card .thumb-wrap { position: relative; }
.event-card .thumb { width: 100%; height: 140px; display: block; object-fit: cover; background: var(--bg); }
.event-card .thumb-empty { width: 100%; height: 140px; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--text-faint); font-size: 13px; }
.date-badge {
  position: absolute; top: 10px; left: 10px; background: var(--amber); color: #3f2d00;
  border-radius: 10px; padding: 4px 8px; text-align: center; line-height: 1.1; box-shadow: var(--shadow);
}
.date-badge .d { font-size: 16px; font-weight: 800; display: block; }
.date-badge .m { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; display: block; }
.event-card .body { padding: 14px 18px 18px; }
.event-card .org-row { margin-bottom: 8px; }
.event-card .title { font-size: 16px; font-weight: 800; margin-bottom: 6px; line-height: 1.3; }
.event-card .excerpt { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card .meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; display: flex; flex-direction: column; gap: 3px; }
.event-card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag-online { background: #dcfce7; color: #166534; }

/* Detail view */
.back-link { background: transparent; border: none; color: var(--text); font-weight: 700; cursor: pointer; padding: 10px 0; margin-bottom: 20px; display: inline-block; font-size: 14px; }
.detail-eyebrow { font-size: 12px; font-weight: 700; color: var(--pink); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.detail-title { font-size: 30px; font-weight: 800; margin: 0 0 14px; letter-spacing: -0.01em; }
.detail-meta { display: flex; gap: 14px; color: var(--text-muted); margin-bottom: 16px; flex-wrap: wrap; font-weight: 500; font-size: 14px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-image { width: 100%; height: 280px; display: block; margin-bottom: 32px; border-radius: var(--radius); object-fit: cover; background: var(--bg); }
.detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; }
.detail-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow); }
.detail-panel h2 { font-size: 16px; font-weight: 800; margin: 0 0 10px; }
.detail-panel p { line-height: 1.6; margin: 0; color: #374151; }
.side-panel { border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.side-panel.carpool { background: #f0fdfa; border: 1px solid #ccfbf1; }
.side-panel.oepnv { background: #faf5ff; border: 1px solid #f3e8ff; }
.side-panel h3 { font-size: 15px; font-weight: 800; margin: 0 0 4px; }
.side-panel.carpool h3 { color: #115e59; }
.side-panel.oepnv h3 { color: #6b21a8; }
.side-panel > p.intro { font-size: 13px; margin: 0 0 16px; }
.side-panel.carpool > p.intro { color: #0f766e; }
.side-panel.oepnv > p.intro { color: #7c3aed; }
.offer-card, .group-card { border-radius: var(--radius-sm); background: var(--surface); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow); }
.offer-card .name, .group-card .name { font-weight: 700; }
.offer-card .meta, .group-card .meta { font-size: 13px; color: var(--text-muted); }
.offer-card .status, .group-card .status { font-size: 13px; margin: 8px 0; font-weight: 600; }
.mini-field { padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; width: 100%; margin-bottom: 8px; background: var(--surface); }
.mini-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* Anhänge */
.attachments-list { display: flex; flex-direction: column; gap: 8px; }
.attachments-list:not(:empty) { margin-bottom: 10px; }
.attachment-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px;
}
.attachment-row .name { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-row .size { color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.attachment-row .remove-btn { background: transparent; border: none; color: #dc2626; font-weight: 700; cursor: pointer; font-size: 13px; white-space: nowrap; }
.attachment-row .remove-btn:hover { text-decoration: underline; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: var(--text); color: #fff;
  padding: 14px 20px; border-radius: var(--radius-sm); font-weight: 700; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  font-size: 14px;
}

/* Image / Datei-Upload */
.image-drop {
  border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 12px; text-align: center; cursor: pointer;
  color: var(--text-muted); font-size: 13px; position: relative; overflow: hidden; min-height: 120px;
  display: flex; align-items: center; justify-content: center; background: var(--surface);
}
.image-drop img { max-width: 100%; max-height: 200px; border-radius: var(--radius-sm); }
.image-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop {
  border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 16px; text-align: center; cursor: pointer;
  color: var(--text-muted); font-size: 13px; position: relative; background: var(--surface);
}
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.checkbox-field { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; margin-bottom: 16px; cursor: pointer; color: var(--text); }
.checkbox-field input { width: 16px; height: 16px; accent-color: var(--pink); }

@media (max-width: 720px) {
  .nav-wrap { padding: 12px 16px; flex-wrap: wrap; row-gap: 12px; }
  .nav-links { gap: 2px; }
  .page-pad, .page-pad-narrow, .page-pad-medium { padding: 24px 20px; }
  .hero-banner, .home-hero { padding: 28px 22px; }
  .hero-banner h1, .home-hero h1 { font-size: 26px !important; }
  .stat-grid { grid-template-columns: 1fr !important; }
  .detail-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .cards-grid { grid-template-columns: 1fr !important; }
  .form-row-2, .form-row-zip { grid-template-columns: 1fr !important; }
}
