/* F3 Dashboard – Dark Theme (F3-Brand: Neon Pink + Cyan) */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Rajdhani:wght@400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --black:  #060608;
  --deep:   #0a0a10;
  --card:   #0f0f18;
  --border: rgba(255,255,255,0.07);
  --pink:   #e91e8c;
  --cyan:   #00d4ff;
  --orange: #ff6b1a;
  --purple: #9b27d4;
  --white:  #f4f0ff;
  --muted:  #6a6580;
  --ok:     #00e676;
  --warn:   #ffab00;
  --error:  #ff1744;
}

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

body {
  background: var(--black);
  color: var(--white);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 400;
  min-height: 100vh;
  line-height: 1.5;
}

/* ── Header / Nav (JOYclub-Stil) ────────────────────────────────────────────── */
.dash-header {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(233,30,140,0.4);
  background: #0d0d14;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

/* ── Top-Bar (Zeile 1) ── */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 52px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Logo */
.dash-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* 3×3 Punkte-Grid wie JOYclub */
.dash-logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  grid-template-rows: repeat(3, 5px);
  gap: 2.5px;
}
.dash-logo-grid span {
  width: 5px; height: 5px;
  background: var(--pink);
  border-radius: 1px;
  opacity: 0.85;
}

.dash-logo-mark {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

/* Rechte Seite der Top-Bar */
.dash-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Badge-Buttons (Nachrichten / Benachrichtigungen / Kontakte) */
.dash-badge-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(244,240,255,0.55);
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  gap: 1px;
  transition: color 0.15s, background 0.15s;
  position: relative;
  min-width: 52px;
}
.dash-badge-btn:hover:not(:disabled) { color: var(--white); background: rgba(255,255,255,0.05); }
.dash-badge-btn:disabled { cursor: not-allowed; opacity: 0.4; }

.dash-badge-icon { font-size: 1.1rem; line-height: 1; }
.dash-badge-label { font-size: 0.6rem; color: inherit; white-space: nowrap; }

.dash-badge-count {
  position: absolute;
  top: 4px; right: 6px;
  background: var(--pink);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  line-height: 1;
}
.dash-badge-count:empty,
.dash-badge-count[data-val="—"] { display: none; }

/* Trennlinie zwischen Badges und User */
.dash-topbar-sep {
  width: 1px; height: 28px;
  background: rgba(255,255,255,0.1);
  margin: 0 0.5rem;
}

/* Deploy-Version Badge */
.dash-version-badge {
  font-size: 0.7rem;
  font-family: monospace;
  color: rgba(0,212,255,0.7);
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 3px;
  padding: 0.15rem 0.5rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.dash-version-badge:hover {
  color: var(--cyan);
  background: rgba(0,212,255,0.12);
  border-color: rgba(0,212,255,0.4);
}

/* Refresh-Info (jetzt in der Nav-Leiste) */
.dash-refresh-info {
  font-size: 0.78rem;
  color: rgba(244,240,255,0.85);
  padding: 0 0.5rem;
  white-space: nowrap;
  align-self: center;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.dash-refresh-info strong { color: var(--pink); }

/* User-Chip (Avatar + Name wie JOYclub) */
.dash-user-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.6rem 0.25rem 0.25rem;
  border-radius: 20px;
  background: rgba(233,30,140,0.08);
  border: 1px solid rgba(233,30,140,0.2);
  cursor: default;
  margin: 0 0.25rem;
}
.dash-user-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
  border: 1px solid rgba(233,30,140,0.4);
}
#dash-nav-username {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}

/* ── Nav-Leiste (Zeile 2) ── */
.dash-nav {
  display: flex;
  align-items: stretch;
  padding: 0 1.5rem;
  height: 42px;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(0,0,0,0.2);
}
.dash-nav::-webkit-scrollbar { display: none; }

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(244,240,255,0.6);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0 1rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: 'Rajdhani', sans-serif;
}
.dash-nav-item:hover {
  color: var(--white);
  border-bottom-color: rgba(233,30,140,0.45);
}
.dash-nav-item.active {
  color: var(--white);
  border-bottom-color: var(--pink);
  font-weight: 700;
}
/* Geplante / noch nicht verfügbare Items */
.dash-nav-soon {
  opacity: 0.45;
  cursor: not-allowed;
}
.dash-nav-soon:hover {
  color: rgba(244,240,255,0.6);
  border-bottom-color: transparent;
}
/* Inline-Badge (z.B. Nachrichten-Zahl) */
.dash-nav-badge {
  background: var(--pink);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}
/* Externer Link */
.dash-nav-ext {
  color: rgba(0,212,255,0.65);
  margin-left: auto;
  font-size: 0.75rem;
}
.dash-nav-ext:hover { color: var(--cyan); border-bottom-color: rgba(0,212,255,0.4); }
.dash-nav-sep { flex: 1; }

/* ── Header Buttons ─────────────────────────────────────────────────────────── */
.btn-logout {
  background: rgba(255,23,68,0.07);
  border: 1px solid rgba(255,23,68,0.25);
  color: var(--error);
  padding: 0.3rem 0.75rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { background: rgba(255,23,68,0.18); }

.btn-refresh {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.05em;
}
.btn-refresh:hover {
  border-color: var(--pink);
  color: var(--pink);
}
/* In der Nav-Leiste */
.dash-nav-refresh {
  margin: auto 0.5rem auto 0;
  padding: 0.25rem 0.7rem;
  font-size: 0.78rem;
  align-self: center;
}

.wf-title-link {
  color: inherit;
  text-decoration: none;
}
.wf-title-link:hover {
  color: var(--cyan);
  text-decoration: underline;
}

/* ── Main Grid ──────────────────────────────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Workflow Card ──────────────────────────────────────────────────────────── */
.wf-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
}

.wf-card:hover {
  border-color: rgba(233,30,140,0.25);
  transform: translateY(-2px);
}

/* Loading shimmer */
.wf-card.wf-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Card top accent line */
.wf-card::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}

.wf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0.75rem;
}

.wf-title-group { display: flex; align-items: center; gap: 0.75rem; }

.wf-icon {
  font-size: 1.2rem;
  opacity: 0.85;
}

.wf-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--white);
}

/* ── Status Badge ───────────────────────────────────────────────────────────── */
.wf-status-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid;
}

.wf-status-icon { font-size: 0.8rem; }
.wf-status-text { }

.status-ok {
  color: var(--ok);
  border-color: rgba(0,230,118,0.3);
  background: rgba(0,230,118,0.07);
}
.status-warn {
  color: var(--warn);
  border-color: rgba(255,171,0,0.3);
  background: rgba(255,171,0,0.07);
}
.status-error {
  color: var(--error);
  border-color: rgba(255,23,68,0.3);
  background: rgba(255,23,68,0.07);
}
.status-unknown {
  color: var(--muted);
  border-color: rgba(106,101,128,0.3);
  background: rgba(106,101,128,0.07);
}

/* ── Card Body ──────────────────────────────────────────────────────────────── */
.wf-body { padding: 0 1.5rem 1.5rem; }

.wf-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

.wf-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.wf-table tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.wf-table tr:last-child { border-bottom: none; }

.wf-label {
  color: var(--muted);
  padding: 0.45rem 0;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  width: 45%;
}

.wf-value {
  color: var(--white);
  padding: 0.45rem 0;
  font-weight: 500;
  text-align: right;
}

/* Placeholder note */
.wf-placeholder-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(106,101,128,0.3);
  border-radius: 3px;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.dash-footer {
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dash-topbar { padding: 0.5rem 1rem; }
  .dash-logo-sub { display: none; }
  .dash-refresh-info { display: none; }
  .dash-grid { padding: 1rem; gap: 1rem; }
  .dash-main { padding: 1rem; gap: 1rem; }
  .dash-nav { padding: 0 0.5rem; }
  .dash-nav-item { padding: 0.5rem 0.6rem; font-size: 0.75rem; }
}

/* ── Main Container ──────────────────────────────────────────────────────────── */
.dash-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── Inner Workflow Grid ─────────────────────────────────────────────────────── */
.wf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ── Collapsible Sections ────────────────────────────────────────────────────── */
.dash-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 2px solid var(--pink);
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s;
}
.section-header:hover { border-color: var(--pink); box-shadow: 0 0 0 1px var(--pink); }

.section-toggle {
  color: var(--cyan);
  font-size: 11px;
  transition: transform 0.25s;
  display: inline-block;
  min-width: 12px;
}
.dash-section.collapsed .section-toggle { transform: rotate(-90deg); }

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  color: var(--white);
  flex: 1;
}

.section-body {
  overflow: hidden;
  max-height: 3000px;
  transition: max-height 0.35s ease, padding-top 0.2s;
  padding-top: 1rem;
}
.dash-section.collapsed .section-body {
  max-height: 0;
  padding-top: 0;
}

/* ── Events List ─────────────────────────────────────────────────────────────── */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.07);
  border-top: 2px solid var(--cyan);
  border-radius: 4px;
  padding: 16px;
  transition: border-color 0.2s, transform 0.15s;
}
.event-card:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.event-header {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.event-date {
  font-size: 11px;
  color: var(--cyan);
  font-weight: 600;
  white-space: nowrap;
}

.event-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  flex: 1;
}

.event-link {
  color: var(--pink);
  text-decoration: none;
  font-size: 11px;
  white-space: nowrap;
}
.event-link:hover { text-decoration: underline; }

.event-post-day {
  font-size: 10px;
  color: var(--orange);
  background: rgba(255,107,26,0.12);
  border: 1px solid rgba(255,107,26,0.3);
  border-radius: 3px;
  padding: 2px 7px;
  white-space: nowrap;
}

.event-name-link {
  color: var(--white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  flex: 1;
}
.event-name-link:hover { color: var(--cyan); text-decoration: underline; }

.event-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}

.event-stat {
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  padding: 8px 10px;
  text-align: center;
}

.event-stat-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 4px;
}

.event-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
}

.event-stat.men .event-stat-value   { color: var(--cyan); }
.event-stat.women .event-stat-value { color: var(--pink); }
.event-stat.couples .event-stat-value { color: #9b27d4; }

/* ── Untersektion (Events in Allgemein) ──────────────────────────────────── */
.dash-subsection > .section-header { border-top-color: var(--cyan); }

/* ── Workflow-Liste vertikal ─────────────────────────────────────────────── */
.wf-list { display: flex; flex-direction: column; gap: 8px; }

/* ── Klickbarer Karten-Header ────────────────────────────────────────────── */
.wf-toggle { cursor: pointer; user-select: none; }
.wf-toggle:hover { border-bottom: 1px solid rgba(233,30,140,0.4); }

/* ── Collapsed-State ─────────────────────────────────────────────────────── */
.wf-collapsed { display: none !important; }

/* ── Pfeil auf Karten-Ebene ──────────────────────────────────────────────── */
.wf-card-toggle {
  color: var(--cyan);
  font-size: 10px;
  min-width: 12px;
  display: inline-block;
  transition: transform 0.2s;
  margin-right: 4px;
}

/* ── Error Glow Animation ────────────────────────────────────────────────── */
@keyframes errorGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,23,68,0); }
  50%       { box-shadow: 0 0 16px 3px rgba(255,23,68,0.25); }
}
.wf-card.has-error { animation: errorGlow 2.5s ease-in-out infinite; }
.wf-card.wf-inactive { opacity: 0.38; pointer-events: none; filter: grayscale(0.4); }
.wf-card.wf-inactive .wf-title { color: var(--muted); }

/* Datenquelle & Login Badges */
.wf-source-badge {
  display: inline-block; padding: 0.15rem 0.45rem;
  background: rgba(0,212,255,0.12); color: var(--cyan);
  font-size: 0.62rem; border-radius: 3px; margin-left: 0.4rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  vertical-align: middle; white-space: nowrap;
}
.wf-login-badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; margin-left: 0.3rem; vertical-align: middle;
  cursor: help;
}
.wf-note-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px; padding: 0.1rem 0.35rem;
  font-size: 0.75rem; color: var(--muted); cursor: pointer;
  margin-left: 0.4rem; vertical-align: middle; transition: background .15s, color .15s;
}
.wf-note-btn:hover { background: rgba(192,116,232,0.18); color: var(--accent); border-color: var(--accent); }

/* ── Workflow Sticky-Note Popover ─────────────────────────────────────────── */
.wf-note-popover {
  position: absolute; z-index: 9000;
  width: 340px;
  background: var(--card, #1e1e2e);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  font-size: 0.82rem;
  color: var(--text);
  overflow: hidden;
}
.wf-note-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.8rem 0.45rem;
  background: rgba(192,116,232,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wf-note-title { font-weight: 700; font-size: 0.83rem; color: var(--accent); }
.wf-note-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 0.9rem; padding: 0 0.2rem;
  line-height: 1;
}
.wf-note-close:hover { color: var(--text); }
.wf-note-section {
  padding: 0.55rem 0.8rem 0.45rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.wf-note-section:last-child { border-bottom: none; }
.wf-note-section strong { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: block; margin-bottom: 0.25rem; }
.wf-note-section p { margin: 0; line-height: 1.45; color: var(--text); }
.wf-note-ok strong { color: #4caf7c; }
.wf-note-nok strong { color: var(--warn, #e8a838); }

/* ── Active Pulse Dot ────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}
.pulse-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  animation: pulse 1.8s ease-in-out infinite;
  margin-right: 2px;
  vertical-align: middle;
}

/* ── Execution Dots ──────────────────────────────────────────────────────── */
.exec-dots { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.exec-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.exec-dot-ok   { background: var(--ok);    box-shadow: 0 0 5px rgba(0,230,118,0.5); }
.exec-dot-err  { background: var(--error); box-shadow: 0 0 5px rgba(255,23,68,0.5); }
.exec-dot-warn { background: var(--warn);  box-shadow: 0 0 5px rgba(255,171,0,0.5); }
.exec-dot-empty { background: rgba(255,255,255,0.1); }

/* ── Ladies Voting Pipeline ──────────────────────────────────────────────── */

.lv-pipeline {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-bottom: 0.5rem;
}

.lv-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.9rem 0.8rem 0.75rem;
  min-width: 130px;
  flex: 1 1 130px;
  max-width: 175px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  position: relative;
  transition: border-color 0.2s, transform 0.15s;
  cursor: pointer;
}
.lv-step::before {
  content: '';
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
  position: absolute;
  top: 0; left: 0; right: 0;
  border-radius: 4px 4px 0 0;
}
.lv-step:hover { border-color: rgba(233,30,140,0.3); transform: translateY(-2px); }
.lv-step.lv-step-planned { opacity: 0.45; pointer-events: none; }
.lv-step.lv-step-planned::before { background: var(--muted); }
.lv-step.has-error { animation: errorGlow 2.5s ease-in-out infinite; }

.lv-step-lv {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 3px;
  padding: 1px 7px;
  align-self: flex-start;
}
.lv-step-icon { font-size: 1.6rem; line-height: 1; margin: 0.1rem 0; }
.lv-step-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.07em;
  color: var(--white);
  line-height: 1.2;
}
.lv-step-desc {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.3;
  max-width: 140px;
}
.lv-step .wf-status-badge { font-size: 0.62rem; padding: 0.18rem 0.5rem; }

.lv-step-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
}
.lv-step-time { font-size: 0.65rem; color: var(--muted); }
.lv-dep-badge {
  font-size: 0.6rem;
  background: rgba(233,30,140,0.1);
  border: 1px solid rgba(233,30,140,0.25);
  border-radius: 3px;
  padding: 1px 5px;
  color: var(--pink);
}
.lv-step-link {
  font-size: 0.65rem;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 0.08em;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.lv-step-link:hover { opacity: 1; text-decoration: underline; }
.lv-planned-tag { color: var(--muted); cursor: default; font-size: 0.65rem; letter-spacing: 0.06em; }

/* Auto-Login Bar (LV 0) */
.lv-login-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.lv-login-btn {
  background: rgba(233,30,140,0.1);
  border: 1px solid rgba(233,30,140,0.4);
  color: var(--pink);
  padding: 0.4rem 1rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
}
.lv-login-btn:hover:not(:disabled) {
  background: rgba(233,30,140,0.2);
  box-shadow: 0 0 12px rgba(233,30,140,0.3);
}
.lv-login-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.lv-login-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.lv-log-toggle {
  font-size: 0.62rem;
  color: var(--error);
  background: rgba(255,23,68,0.08);
  border: 1px solid rgba(255,23,68,0.25);
  border-radius: 3px;
  padding: 2px 6px;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  width: 100%;
  transition: background 0.15s;
}
.lv-log-toggle:hover { background: rgba(255,23,68,0.14); }

.lv-step-log {
  width: 100%;
  background: rgba(255,23,68,0.04);
  border: 1px solid rgba(255,23,68,0.15);
  border-radius: 3px;
  padding: 0.4rem;
  text-align: left;
}
.lv-log-entry {
  font-size: 0.62rem;
  color: var(--error);
  padding: 2px 0;
  border-bottom: 1px solid rgba(255,23,68,0.08);
  font-family: monospace;
}
.lv-log-entry:last-child { border-bottom: none; }
.lv-log-link {
  margin-left: 0.5em;
  color: rgba(255,23,68,0.7);
  text-decoration: none;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.lv-log-link:hover { color: var(--error); text-decoration: underline; }

/* ── Deploy History ──────────────────────────────────────────────────────── */
.deploy-commit {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}
.deploy-commit:last-child { border-bottom: none; }
.deploy-commit:hover { background: rgba(255,255,255,0.02); }
.deploy-commit--current {
  background: rgba(0,212,255,0.04);
  border-left: 2px solid var(--cyan);
  padding-left: calc(0.75rem - 2px);
}
.deploy-commit-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.deploy-commit-sha {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.deploy-commit-sha:hover { text-decoration: underline; }
.deploy-commit-live {
  font-size: 0.65rem;
  color: var(--cyan);
  background: rgba(0,212,255,0.12);
  border: 1px solid rgba(0,212,255,0.3);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  flex-shrink: 0;
}
.deploy-commit-date {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}
.deploy-commit-msg {
  font-size: 0.85rem;
  color: var(--white);
  font-weight: 500;
}
.deploy-commit-body {
  font-size: 0.75rem;
  color: var(--muted);
}

.lv-arrow {
  display: flex;
  align-items: center;
  color: var(--cyan);
  font-size: 0.8rem;
  opacity: 0.5;
  padding-top: 3.5rem;
  flex-shrink: 0;
  align-self: flex-start;
}

.lv-dep-note {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding: 0.5rem 0.85rem;
  background: rgba(233,30,140,0.04);
  border: 1px dashed rgba(233,30,140,0.2);
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lv-dep-note strong { color: var(--pink); }

/* ── LV Kandidaten ───────────────────────────────────────────────────────── */
.lv-candidates-wrap {
  margin-top: 0.85rem;
}
.lv-candidates-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.lv-candidates-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pink);
}
.lv-candidates-summary {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.lv-cand-summary-badge {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.lv-cand-status--neu      { background: rgba(255,171,0,0.12);  color: var(--warn);  border: 1px solid rgba(255,171,0,0.3); }
.lv-cand-status--fotos    { background: rgba(0,212,255,0.1);   color: var(--cyan);  border: 1px solid rgba(0,212,255,0.3); }
.lv-cand-status--gesendet { background: rgba(0,230,118,0.1);   color: var(--ok);    border: 1px solid rgba(0,230,118,0.3); }
.lv-cand-status--fehler   { background: rgba(255,23,68,0.1);   color: var(--error); border: 1px solid rgba(255,23,68,0.3); }

.lv-candidates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.lv-cand-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.4rem 0.6rem;
  min-width: 140px;
  max-width: 190px;
  transition: border-color 0.2s;
}
.lv-cand-card:hover { border-color: rgba(233,30,140,0.3); }
.lv-cand-thumb {
  width: 36px; height: 36px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.lv-cand-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lv-cand-thumb--empty { color: var(--muted); }
.lv-cand-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.lv-cand-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lv-cand-name:hover { color: var(--pink); }
.lv-cand-meta {
  font-size: 0.62rem;
  color: var(--muted);
}
.lv-cand-status {
  font-size: 0.58rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 2px;
  letter-spacing: 0.03em;
  align-self: flex-start;
}
.lv-cand-empty {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 0.5rem 0;
}

/* ── Event Countdown Badge ───────────────────────────────────────────────── */
.event-countdown {
  font-size: 10px;
  color: var(--ok);
  background: rgba(0,230,118,0.1);
  border: 1px solid rgba(0,230,118,0.3);
  border-radius: 3px;
  padding: 2px 7px;
  white-space: nowrap;
  font-weight: 600;
}
.event-countdown.today  { color: var(--pink); background: rgba(233,30,140,0.1); border-color: rgba(233,30,140,0.3); }
.event-countdown.soon   { color: var(--warn); background: rgba(255,171,0,0.1);  border-color: rgba(255,171,0,0.3); }

/* ── Login Overlay ───────────────────────────────────────────────────────── */
#login-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--black);
  display: flex; align-items: center; justify-content: center;
}
#login-overlay.hidden { display: none; }

.login-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--pink);
  border-radius: 6px;
  padding: 2.5rem 2rem;
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.login-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem; color: var(--pink); line-height: 1;
}
.login-sub {
  font-size: 0.7rem; letter-spacing: 0.15em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 1.5rem;
}
#login-form { width: 100%; display: flex; flex-direction: column; gap: 1rem; }
.login-field { display: flex; flex-direction: column; gap: 0.3rem; }
.login-field label { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.05em; }
.login-field input {
  background: var(--deep); border: 1px solid var(--border);
  border-radius: 4px; color: var(--white);
  padding: 0.6rem 0.8rem; font-size: 0.9rem; outline: none;
  transition: border-color 0.2s;
}
.login-field input:focus { border-color: var(--pink); }
#login-btn {
  margin-top: 0.5rem; padding: 0.7rem;
  background: var(--pink); color: #fff; border: none;
  border-radius: 4px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; letter-spacing: 0.05em; transition: opacity 0.2s;
}
#login-btn:hover { opacity: 0.85; }
#login-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#login-error {
  font-size: 0.8rem; color: var(--error);
  min-height: 1.2rem; text-align: center;
}

/* ── Auto-Post Sektion ───────────────────────────────────────────────────── */
/* Jetzt Pushen */
.autopost-push-bar {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  background: rgba(233,30,140,0.08); border: 1px solid rgba(233,30,140,0.3);
  border-radius: 6px; padding: 0.65rem 1rem; margin-bottom: 0.5rem;
}
.autopost-push-label { font-size: 0.85rem; font-weight: 600; color: var(--pink); white-space: nowrap; }
.autopost-push-select {
  flex: 1; min-width: 180px; padding: 0.35rem 0.6rem;
  background: var(--deep); border: 1px solid var(--border);
  border-radius: 4px; color: var(--white); font-family: inherit; font-size: 0.85rem;
}
.autopost-push-select:focus { outline: none; border-color: var(--pink); }
.autopost-push-btn {
  padding: 0.35rem 1rem; background: var(--pink); color: #fff;
  border: none; border-radius: 4px; cursor: pointer; font-size: 0.85rem;
  font-family: inherit; font-weight: 700; white-space: nowrap;
}
.autopost-push-btn:hover { opacity: 0.85; }
.autopost-push-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.autopost-push-hint { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.autopost-push-hint.hint-ok    { color: #4caf50; }
.autopost-push-hint.hint-error { color: var(--pink); }
.autopost-push-hint.hint-warn  { color: #f0a500; }
.autopost-push-hint.hint-info  { color: rgba(244,240,255,0.7); }

.autopost-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.75rem; }

/* Globale Posting-Zeit */
.autopost-schedule-bar {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.65rem 1rem; margin-bottom: 0.25rem;
}
.autopost-schedule-label { font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
.autopost-time-wrap { display: flex; align-items: center; gap: 0.3rem; }
.autopost-time-input {
  width: 3.2rem; text-align: center; padding: 0.3rem 0.4rem;
  background: var(--deep); border: 1px solid var(--border); border-radius: 4px;
  color: var(--white); font-family: inherit; font-size: 1rem; font-weight: 600;
}
.autopost-time-input:focus { outline: none; border-color: var(--pink); }
.autopost-time-sep { font-size: 1.1rem; font-weight: 700; color: var(--white); }
.autopost-save-time {
  padding: 0.3rem 0.8rem; background: var(--pink); color: #fff;
  border: none; border-radius: 4px; cursor: pointer; font-size: 0.82rem;
  font-family: inherit; font-weight: 600;
}
.autopost-save-time:hover { opacity: 0.85; }
.autopost-save-time:disabled { opacity: 0.5; cursor: not-allowed; }
.autopost-time-hint { font-size: 0.78rem; color: var(--muted); }

/* Event-Karten */
.autopost-card {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--cyan); border-radius: 6px; padding: 0.7rem 1rem;
}
.autopost-card-header {
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap;
}
.autopost-card-date { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.autopost-card-name { font-size: 0.95rem; font-weight: 600; color: var(--white); flex: 1; }
.autopost-card-status {
  font-size: 0.7rem; padding: 0.15rem 0.5rem;
  border-radius: 3px; background: rgba(255,255,255,0.06); color: var(--muted);
}

/* Wochentag-Auswahl */
.autopost-days-row {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
}
.autopost-days-label { font-size: 0.75rem; color: var(--muted); white-space: nowrap; min-width: 80px; }
.autopost-days { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.autopost-day-btn {
  padding: 0.25rem 0.5rem; border-radius: 4px; border: 1px solid var(--border);
  background: var(--deep); color: var(--muted); cursor: pointer;
  font-family: inherit; font-size: 0.78rem; font-weight: 600;
  transition: all 0.15s;
}
.autopost-day-btn:hover { border-color: var(--pink); color: var(--white); }
.autopost-day-btn.active {
  background: var(--pink); border-color: var(--pink); color: #fff;
}

/* ── Cookie-Lock: Gesperrte Sektionen ─────────────────────────────────────── */
.cookie-locked > .section-body > *:not(.cookie-lock-banner) {
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.35s;
}
.cookie-lock-banner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.9rem;
  background: rgba(233,30,140,0.06);
  border: 1px solid rgba(233,30,140,0.22);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  position: relative;
}
.cookie-lock-icon { font-size: 1rem; flex-shrink: 0; }
.cookie-lock-login-btn {
  margin-left: auto;
  flex-shrink: 0;
  padding: 0.2rem 0.7rem;
  background: transparent;
  border: 1px solid rgba(233,30,140,0.45);
  color: var(--pink);
  border-radius: 4px;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.15s;
}
.cookie-lock-login-btn:hover { background: rgba(233,30,140,0.12); }
.autopost-day-hint { font-size: 0.75rem; color: var(--muted); margin-left: auto; }

/* ── Notification List ──────────────────────────────────────────────────────── */
.notif-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.25rem 0.5rem;
  gap: 0.5rem;
}

.msg-filter-btns {
  display: flex;
  gap: 2px;
}

.msg-filter-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--muted);
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.msg-filter-btn:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text);
}

.msg-filter-btn.active {
  background: rgba(192,116,232,0.18);
  border-color: var(--accent, #c074e8);
  color: var(--accent, #c074e8);
}

.notif-mark-read-btn {
  background: none;
  border: 1px solid rgba(244,240,255,0.18);
  border-radius: 4px;
  color: rgba(244,240,255,0.7);
  font-size: 0.72rem;
  padding: 0.28rem 0.65rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.notif-mark-read-btn:hover:not(:disabled) { border-color: var(--cyan); color: var(--cyan); }
.notif-mark-read-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.notif-list {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.notif-item {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
  border-left: 2px solid transparent;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.04); }
.notif-item--unread { border-left-color: var(--pink); }

/* Avatar – Bild oder Emoji-Fallback */
.notif-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.notif-item-avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.07);
  font-size: 1.1rem;
}

.notif-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-item-title {
  font-size: 0.83rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(244,240,255,0.85);
}
.notif-item--unread .notif-item-title { color: #fff; }

.notif-item-sub {
  font-size: 0.73rem;
  color: rgba(244,240,255,0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-cat {
  font-size: 0.65rem;
  color: rgba(244,240,255,0.3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.notif-item-date {
  font-size: 0.65rem;
  color: rgba(244,240,255,0.35);
  white-space: nowrap;
}

.notif-unread-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--pink);
  flex-shrink: 0;
}

.notif-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.4rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 0.25rem;
  gap: 0.5rem;
}

.notif-count-info {
  font-size: 0.68rem;
  color: rgba(244,240,255,0.3);
}

.notif-footer-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.notif-load-more {
  background: none;
  border: none;
  color: var(--cyan);
  font-size: 0.72rem;
  cursor: pointer;
  opacity: 0.75;
  padding: 0;
  transition: opacity 0.15s;
}
.notif-load-more:hover { opacity: 1; }

.notif-fetched-at {
  font-size: 0.68rem;
  color: rgba(244,240,255,0.3);
}

.notif-refresh-btn {
  background: none;
  border: 1px solid rgba(244,240,255,0.18);
  border-radius: 4px;
  color: rgba(244,240,255,0.5);
  font-size: 0.85rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  line-height: 1;
}
.notif-refresh-btn:hover { color: var(--cyan); border-color: var(--cyan); }
.notif-refresh-btn:disabled { opacity: 0.4; cursor: default; }

.notif-open-link {
  font-size: 0.72rem;
  color: var(--cyan);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.notif-open-link:hover { opacity: 1; }

.notif-empty {
  padding: 0.6rem 0.5rem;
  color: rgba(244,240,255,0.4);
  font-size: 0.82rem;
}

/* ── Benachrichtigungen Dropdown ─────────────────────────────────────────── */

.notif-dropdown-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: transparent;
}

.notif-dropdown {
  position: fixed;
  top: 72px; /* unter dem Header */
  right: 12px;
  width: min(420px, calc(100vw - 24px));
  max-height: calc(100vh - 90px);
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  z-index: 910;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.notif-dropdown-title {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
}

.notif-dropdown-close {
  background: none;
  border: none;
  color: rgba(244,240,255,0.4);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
  flex-shrink: 0;
}
.notif-dropdown-close:hover { color: var(--white); background: rgba(255,255,255,0.08); }

.notif-dropdown-body {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem 0.75rem;
}

/* ── ClubMail Overlay ────────────────────────────────────────────────────── */

.clubmail-overlay {
  position: fixed;
  inset: 0;
  z-index: 920;
  background: var(--deep);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.clubmail-overlay-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: var(--card);
  flex-shrink: 0;
}

.clubmail-overlay-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--white);
}

.clubmail-overlay-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
}

/* ── ClubMail Split-Layout ───────────────────────────────────────────────── */

.msg-split {
  display: flex;
  height: calc(100vh - 130px);
  min-height: 400px;
  gap: 0;
}

.msg-split-list {
  width: 320px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.msg-search-wrap {
  padding: 0.5rem 0.6rem 0.3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.msg-search-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 0.35rem 0.75rem;
  color: rgba(244,240,255,0.85);
  font-size: 0.8rem;
  outline: none;
}
.msg-search-input::placeholder { color: rgba(255,255,255,0.3); }
.msg-search-input:focus { border-color: var(--cyan, #63CADC); }

.msg-split-list .msg-list {
  flex: 1;
  overflow-y: auto;
}

.msg-split-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.5rem 0.75rem;
}

/* Konversationsliste – JOYclub-Style */
.msg-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.15s;
}
.msg-item:hover { background: rgba(255,255,255,0.04); }
.msg-item--unread .msg-item-name { font-weight: 700; color: var(--white); }
.msg-item--unread .msg-item-preview { color: rgba(244,240,255,0.75); }
.msg-item--active {
  background: rgba(99,202,220,0.08) !important;
  border-left: 3px solid var(--cyan);
}

/* Avatar mit Unread-Badge */
.msg-item-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.msg-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.msg-avatar--fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.msg-unread-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  background: #e03a6e;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* Inhalt rechts vom Avatar */
.msg-item-body {
  flex: 1;
  min-width: 0;
}
.msg-item-row1 {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}
.msg-item-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(244,240,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-item-date {
  font-size: 0.67rem;
  color: rgba(244,240,255,0.4);
  white-space: nowrap;
  flex-shrink: 0;
}
.msg-item-preview {
  font-size: 0.75rem;
  color: rgba(244,240,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Gender-Icon (wie JOYclub SVG-Icon) */
.msg-gender-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  top: 1px;
}
.msg-gender-icon::after {
  font-size: 0.7rem;
  line-height: 1;
}
.msg-gender-icon--mann::after     { content: '♂'; color: #5b9cf6; }
.msg-gender-icon--frau::after     { content: '♀'; color: #f97cb0; }
.msg-gender-icon--paar::after     { content: '⚭'; color: #a78bfa; }
.msg-gender-icon--divers::after   { content: '⚧'; color: #a78bfa; }

.msg-thread-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(244,240,255,0.2);
  font-size: 0.9rem;
  font-style: italic;
}

.msg-thread-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.25rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 0.25rem;
  flex-shrink: 0;
}

.msg-thread-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-thread-link {
  font-size: 0.7rem;
  color: var(--cyan);
  text-decoration: none;
  opacity: 0.7;
  white-space: nowrap;
}
.msg-thread-link:hover { opacity: 1; }

.msg-thread-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.3rem 0;
}

.msg-thread-loading {
  color: rgba(244,240,255,0.4);
  font-size: 0.82rem;
  padding: 0.5rem;
}

/* Chat Bubbles */
.msg-bubble {
  max-width: 82%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-word;
}

.msg-bubble--other {
  align-self: flex-start;
  background: rgba(255,255,255,0.09);
  border-bottom-left-radius: 3px;
  margin-right: 3rem;
}

.msg-bubble--own {
  align-self: flex-end;
  background: rgba(220, 55, 100, 0.22);
  border: 1px solid rgba(220, 55, 100, 0.3);
  border-bottom-right-radius: 3px;
  margin-left: 3rem;
}

/* Kompliment-Nachrichten: pink/lila Gradient wie JOYclub */
.msg-bubble--kompliment {
  background: linear-gradient(135deg, rgba(233,30,99,0.25) 0%, rgba(156,39,176,0.25) 100%);
  border: 1px solid rgba(233,30,99,0.2);
}

.msg-bubble-sender {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--cyan, #63CADC);
  margin-bottom: 3px;
}

.msg-bubble-text {
  color: rgba(244,240,255,0.9);
}

.msg-bubble-text br + br { display: none; } /* doppelte Leerzeilen verhindern */

/* Bild-Bubble */
.msg-bubble-img-wrap {
  line-height: 0;
}
.msg-bubble-img {
  max-width: 220px;
  max-height: 300px;
  width: auto; height: auto;
  border-radius: 8px;
  display: block;
  background: rgba(255,255,255,0.06);
  min-width: 80px; min-height: 60px;
}
.msg-bubble-photo-fallback {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  background: rgba(255,255,255,0.07);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Links in Nachrichten */
.msg-link {
  color: var(--cyan, #63CADC);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.msg-link:hover { opacity: 0.8; }

.msg-bubble-date {
  font-size: 0.62rem;
  color: rgba(244,240,255,0.3);
  margin-top: 4px;
  text-align: right;
}

/* Reply Box */
.msg-reply-box {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.msg-reply-textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(244,240,255,0.14);
  border-radius: 6px;
  color: rgba(244,240,255,0.9);
  font-size: 0.82rem;
  font-family: inherit;
  padding: 0.5rem 0.6rem;
  resize: vertical;
  min-height: 72px;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.msg-reply-textarea:focus {
  outline: none;
  border-color: rgba(164,92,255,0.5);
}
.msg-reply-textarea::placeholder { color: rgba(244,240,255,0.25); }

.msg-reply-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.msg-reply-media {
  display: flex;
  gap: 0.25rem;
}

.msg-media-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 1;
  padding: 0.1rem 0.25rem;
  line-height: 1;
  color: var(--text);
  transition: opacity 0.15s;
}
.msg-media-btn:hover { opacity: 0.7; }

.msg-media-btn--text {
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  padding: 2px 7px;
  color: var(--muted);
}
.msg-media-btn--text:hover {
  border-color: var(--accent, #c074e8);
  color: var(--text);
  opacity: 1;
}

.msg-reply-right {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.msg-draft-label {
  font-size: 0.7rem;
  color: var(--cyan);
  opacity: 0.8;
}

.msg-reply-send {
  background: none;
  border: 1px solid rgba(164,92,255,0.45);
  border-radius: 4px;
  color: rgba(164,92,255,0.85);
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.msg-reply-send:hover:not(:disabled) {
  background: rgba(164,92,255,0.15);
  border-color: rgba(164,92,255,0.8);
  color: #c89fff;
}
.msg-reply-send:disabled { opacity: 0.4; cursor: not-allowed; }

.msg-draft-btn {
  background: none;
  border: 1px solid rgba(0,220,180,0.4);
  color: rgba(0,220,180,0.85);
  border-radius: 6px;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.msg-draft-btn:hover:not(:disabled) {
  background: rgba(0,220,180,0.12);
  border-color: rgba(0,220,180,0.75);
}
.msg-draft-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Automatische Antworten Panel ────────────────────────────────────────── */

.msg-auto-section {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}

.msg-auto-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
  transition: color 0.15s, background 0.15s;
}
.msg-auto-header:hover { background: rgba(255,255,255,0.04); color: var(--white); }

.msg-auto-count { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.msg-auto-chevron { margin-left: auto; font-size: 0.65rem; color: var(--muted); }

.msg-auto-body { border-top: 1px solid rgba(255,255,255,0.05); }

.msg-auto-split {
  display: flex;
  height: 220px;
}

.msg-auto-list {
  width: 200px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 0.25rem 0;
}

.msg-auto-entry {
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.12s;
}
.msg-auto-entry:hover { background: rgba(255,255,255,0.05); }
.msg-auto-entry--active { background: rgba(192,116,232,0.12); border-left: 2px solid var(--accent,#c074e8); }

.msg-auto-entry-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-auto-entry-meta {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2px;
}

.msg-auto-entry-type {
  font-size: 0.65rem;
  color: var(--orange);
  background: rgba(255,107,26,0.1);
  padding: 1px 4px;
  border-radius: 3px;
}

.msg-auto-entry-time { font-size: 0.65rem; color: var(--muted); }

.msg-auto-entry-count {
  font-size: 0.65rem;
  background: rgba(233,30,140,0.15);
  color: var(--pink);
  padding: 1px 4px;
  border-radius: 3px;
}

.msg-auto-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.msg-auto-thread-header {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.msg-auto-thread-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-auto-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
}

.msg-auto-showmore {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--muted);
  font-size: 0.7rem;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  margin-bottom: 0.25rem;
  align-self: flex-start;
}
.msg-auto-showmore:hover { background: rgba(255,255,255,0.06); color: var(--white); }

/* ── Fans einladen ──────────────────────────────────────────────────────── */
.fans-progress-bar {
  width: 100%; height: 6px;
  background: var(--bg2, #1e1e2e);
  border-radius: 3px; overflow: hidden;
  margin-bottom: 0.2rem;
}
#ap-fans-bar-fill {
  height: 100%;
  background: var(--cyan, #0ff);
  transition: width 0.5s ease;
  border-radius: 3px;
}
