/* ─────────────────────────────────────────────────────
   BLACK CHERRY DASHBOARD
   Palette: #000000 Schwarz · #a86a7b Pink · #f0d0da Rosa
───────────────────────────────────────────────────── */

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

:root {
  /* Backgrounds */
  --bg-primary:    #000000;
  --bg-secondary:  #060606;
  --bg-card:       #0c0c0c;
  --bg-elevated:   #121212;
  --bg-hover:      #191919;

  /* Borders */
  --border:        #1e1e1e;
  --border-subtle: #0f0f0f;

  /* Text */
  --text-primary:  #f0f0f0;
  --text-secondary:#888888;
  --text-muted:    #444444;

  /* Pink — Primary accent */
  --pink:          #a86a7b;
  --pink-bright:   #c4849a;
  --pink-dim:      #6b3f4e;
  --pink-bg:       rgba(168,106,123,0.10);
  --pink-glow:     rgba(168,106,123,0.22);
  --pink-border:   rgba(168,106,123,0.28);

  /* Cherry dark */
  --cherry:        #6b1a2d;
  --cherry-dim:    #3d0d18;

  /* Backwards compat with existing views */
  --red:           #a86a7b;
  --red-bright:    #c4849a;
  --red-dim:       #6b3f4e;
  --red-bg:        rgba(168,106,123,0.10);
  --red-glow:      rgba(168,106,123,0.22);
  --gold:          #c4849a;
  --gold-dim:      #8a5560;
  --gold-bg:       rgba(196,132,154,0.08);

  /* Status colors */
  --orange:        #f97316;
  --orange-bg:     rgba(249,115,22,0.1);
  --green:         #22c55e;
  --green-dim:     #16a34a;
  --green-bg:      rgba(34,197,94,0.1);
  --blue:          #3b82f6;
  --blue-bg:       rgba(59,130,246,0.1);
  --purple:        #a855f7;
  --purple-bg:     rgba(168,85,247,0.1);

  /* Layout */
  --sidebar-w:     250px;
  --radius:        8px;
  --radius-sm:     5px;
  --radius-lg:     12px;
  --radius-xl:     18px;

  /* Shadows */
  --shadow:        0 2px 16px rgba(0,0,0,0.7);
  --shadow-lg:     0 8px 48px rgba(0,0,0,0.85);
  --shadow-pink:   0 0 30px rgba(168,106,123,0.12);

  --transition: 0.18s ease;
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pink-dim); }

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--pink); text-decoration: none; }
a:hover { color: var(--pink-bright); }

svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── Layout ─────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 28px 32px;
  min-width: 0;
}

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: #000000;
  border-right: 1px solid #141414;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 16px 14px;
  border-bottom: 1px solid #111111;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon-img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--pink-dim);
  box-shadow: 0 0 12px var(--pink-glow);
  transition: box-shadow var(--transition);
}
.logo-icon-img:hover { box-shadow: 0 0 20px var(--pink); }

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-title { font-size: 15px; font-weight: 700; color: var(--text-primary); letter-spacing: .3px; }
.logo-sub   { font-size: 10px; color: var(--text-muted); letter-spacing: .5px; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; }

.nav-group { margin-bottom: 18px; }
.nav-group-label {
  font-size: 9.5px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: #333;
  padding: 0 8px; margin-bottom: 6px; display: block;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.nav-item svg { color: var(--text-muted); transition: color var(--transition); }
.nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-item:hover svg { color: var(--pink); }
.nav-item.active {
  background: var(--pink-bg);
  color: var(--pink-bright);
  border: 1px solid var(--pink-border);
}
.nav-item.active svg { color: var(--pink); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 2.5px; background: var(--pink);
  border-radius: 0 2px 2px 0;
}

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid #111111;
  display: flex; align-items: center; gap: 10px;
}

.user-info { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1.5px solid #222; }
.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.logout-btn {
  color: var(--text-muted); padding: 5px;
  border-radius: 6px; transition: all var(--transition);
  flex-shrink: 0;
}
.logout-btn:hover { color: var(--pink); background: var(--pink-bg); }

/* ── Mobile sidebar toggle ───────────────────────────── */
.sidebar-toggle {
  display: none; position: fixed;
  top: 14px; left: 14px; z-index: 200;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px; color: var(--text-primary);
  cursor: pointer;
}
.sidebar-overlay {
  display: none; position: fixed;
  inset: 0; background: rgba(0,0,0,0.75);
  z-index: 99; backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  .sidebar-overlay.open { opacity: 1; pointer-events: all; }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; padding: 20px 16px; }
}

/* ── Page Header ─────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
  gap: 12px; margin-bottom: 24px;
}

.page-title { font-size: 22px; font-weight: 700; letter-spacing: -.3px; line-height: 1.2; }
.page-sub   { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap; line-height: 1;
  text-decoration: none;
}
.btn svg { width: 14px; height: 14px; }

.btn-primary {
  background: var(--pink);
  color: #fff;
  box-shadow: 0 2px 12px var(--pink-glow);
}
.btn-primary:hover {
  background: var(--pink-bright);
  box-shadow: 0 4px 20px rgba(168,106,123,0.4);
  transform: translateY(-1px); color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); border-color: #333; }

.btn-ghost {
  background: transparent; color: var(--text-muted);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--border); }

.btn-danger { background: rgba(239,68,68,0.12); color: #ef4444; border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.22); }

.btn-success { background: rgba(34,197,94,0.12); color: #22c55e; border: 1px solid rgba(34,197,94,0.22); }
.btn-success:hover { background: rgba(34,197,94,0.22); }

.btn-warning { background: rgba(249,115,22,0.12); color: var(--orange); border: 1px solid rgba(249,115,22,0.22); }
.btn-warning:hover { background: rgba(249,115,22,0.22); }

.btn-pink-outline { background: transparent; color: var(--pink); border: 1px solid var(--pink-border); }
.btn-pink-outline:hover { background: var(--pink-bg); }

.btn-sm { padding: 5px 10px; font-size: 11.5px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }

/* ── Inputs ──────────────────────────────────────────── */
.input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 13px; font-family: inherit;
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px var(--pink-bg);
}
.input::placeholder { color: var(--text-muted); }
.input-mono { font-family: 'Courier New', monospace; font-size: 12px; }
select.input { cursor: pointer; }
textarea.input { resize: vertical; line-height: 1.6; }

/* ── Form ────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; width: 100%; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.form-hint  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.form-full  { grid-column: 1 / -1; }

/* ── Cards ───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; flex-wrap: wrap;
  gap: 8px; margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 700; }
.card-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── Badges ──────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.badge-primary   { background: var(--pink-bg); color: var(--pink-bright); border: 1px solid var(--pink-border); }
.badge-secondary { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.badge-success   { background: var(--green-bg); color: var(--green); border: 1px solid rgba(34,197,94,.2); }
.badge-danger    { background: rgba(239,68,68,.1); color: #ef4444; border: 1px solid rgba(239,68,68,.2); }
.badge-warning   { background: var(--orange-bg); color: var(--orange); border: 1px solid rgba(249,115,22,.2); }

/* ── Role badges ─────────────────────────────────────── */
.badge-boss       { background: var(--pink-bg); color: var(--pink); border: 1px solid var(--pink-border); font-size: 10px; padding: 2px 8px; border-radius: 20px; }
.badge-leadership { background: rgba(168,85,247,.08); color: var(--purple); border: 1px solid rgba(168,85,247,.2); font-size: 10px; padding: 2px 8px; border-radius: 20px; }
.badge-mitglied   { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); font-size: 10px; padding: 2px 8px; border-radius: 20px; }
.badge-none       { background: transparent; color: #333; font-size: 10px; padding: 2px 8px; border-radius: 20px; }

/* ── Stats Grid ──────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.stats-grid-lg { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex; align-items: center; gap: 12px;
  position: relative; overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  animation: fadeUp .35s ease both;
  animation-delay: var(--d, 0s);
}
.stat-card:hover { border-color: var(--pink-dim); transform: translateY(-1px); }

.stat-icon { font-size: 24px; flex-shrink: 0; }
.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stat-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 2px 7px; border-radius: 20px;
  font-size: 10px; font-weight: 700;
}
.stat-danger  { border-color: rgba(239,68,68,.25) !important; }
.stat-warning { border-color: rgba(249,115,22,.25) !important; }

.stat-card-label { font-size: 10.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat-card-value { font-size: 28px; font-weight: 800; line-height: 1; }

/* ── Tables ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--bg-elevated);
  padding: 10px 14px;
  text-align: left; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-elevated); }
tbody tr.danger-row { background: rgba(239,68,68,.04); }
tbody tr.success-row { background: rgba(34,197,94,.04); }

/* ── Filter Bar ──────────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.filter-search { max-width: 260px; flex: 1; min-width: 140px; }
.filter-select { max-width: 160px; }

/* ── Modal ───────────────────────────────────────────── */
.modal {
  display: none; position: fixed;
  inset: 0; z-index: 500;
  align-items: center; justify-content: center;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.80);
  backdrop-filter: blur(4px);
  animation: fadeIn .15s ease;
}

.modal-content {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 90vw; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .2s ease;
  box-shadow: 0 20px 80px rgba(0,0,0,0.8), 0 0 40px var(--pink-glow);
}
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 900px; }

.modal-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--bg-card); z-index: 2;
}
.modal-header h3 { font-size: 15px; font-weight: 700; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 16px; cursor: pointer; padding: 2px 6px;
  border-radius: 4px; transition: color var(--transition);
}
.modal-close:hover { color: var(--text-primary); background: var(--bg-elevated); }

.modal-section { padding: 16px 20px; border-bottom: 1px solid var(--border-subtle); }
.modal-section:last-of-type { border-bottom: none; }

.section-label {
  display: block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--pink); margin-bottom: 12px;
}

.modal-form-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.modal-form-grid .form-group { flex: 1; min-width: 150px; }

.modal-footer {
  display: flex; align-items: center;
  justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky; bottom: 0;
}

/* ── Toggle Switch ───────────────────────────────────── */
.fest-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.fest-toggle input[type=checkbox] { display: none; }
.fest-toggle-info strong { font-size: 13px; display: block; }
.fest-toggle-info span   { font-size: 11px; color: var(--text-muted); }
.fest-toggle::before {
  content: '';
  width: 34px; height: 18px; flex-shrink: 0;
  background: var(--bg-elevated); border: 1.5px solid var(--border);
  border-radius: 20px; transition: all .2s ease;
  position: relative;
}
.fest-toggle::after {
  content: '';
  position: absolute;
  width: 12px; height: 12px;
  background: var(--text-muted);
  border-radius: 50%;
  margin-left: -31px; margin-top: 3px;
  transition: all .2s ease;
}
.fest-toggle:has(input:checked)::before { background: var(--pink); border-color: var(--pink); }
.fest-toggle:has(input:checked)::after  { background: #fff; margin-left: -17px; }

/* ── Alert ───────────────────────────────────────────── */
.alert {
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-warning { background: var(--orange-bg); border: 1px solid rgba(249,115,22,.2); color: var(--orange); }
.alert-danger  { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); color: #ef4444; }
.alert-success { background: var(--green-bg); border: 1px solid rgba(34,197,94,.2); color: var(--green); }
.alert-info    { background: var(--pink-bg); border: 1px solid var(--pink-border); color: var(--pink-bright); }

/* ── Progress Bar ────────────────────────────────────── */
.progress-wrap { background: #111; border-radius: 20px; overflow: hidden; height: 10px; }
.progress-bar  { height: 100%; border-radius: 20px; transition: width .5s ease; background: linear-gradient(90deg, var(--pink-dim), var(--pink), var(--pink-bright)); }

/* ── Empty State ─────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* ── Toast ───────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 20px; right: 20px;
  z-index: 9999; display: flex; flex-direction: column;
  gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 500;
  min-width: 200px; max-width: 320px;
  animation: slideRight .2s ease;
  pointer-events: all;
  box-shadow: var(--shadow);
}
.toast-success { background: rgba(34,197,94,.15); border: 1px solid rgba(34,197,94,.3); color: var(--green); }
.toast-error   { background: rgba(239,68,68,.15); border: 1px solid rgba(239,68,68,.3); color: #ef4444; }
.toast-info    { background: var(--pink-bg); border: 1px solid var(--pink-border); color: var(--pink-bright); }

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  margin-left: var(--sidebar-w);
  padding: 16px 32px;
  border-top: 1px solid #0a0a0a;
}
.site-footer p { font-size: 9.5px; color: #252525; line-height: 1.6; }

/* ── Animations ──────────────────────────────────────── */
@keyframes fadeIn  { from { opacity:0 } to { opacity:1 } }
@keyframes fadeUp  { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:none } }
@keyframes slideUp { from { opacity:0; transform:translateY(20px) } to { opacity:1; transform:none } }
@keyframes slideRight { from { opacity:0; transform:translateX(20px) } to { opacity:1; transform:none } }
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:.5 } }
@keyframes glow  { 0%,100% { box-shadow: 0 0 10px var(--pink-glow) } 50% { box-shadow: 0 0 25px rgba(168,106,123,.4) } }

/* ── Login Page ──────────────────────────────────────── */
body.login-page { overflow: hidden; }

.login-bg {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(168,106,123,0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(107,26,45,0.08) 0%, transparent 50%),
              #000;
  z-index: 0;
}

/* Cherry petal animation */
.cherry-petals {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
}
.petal {
  position: absolute; top: -30px;
  width: 10px; height: 12px;
  background: radial-gradient(ellipse, rgba(168,106,123,0.6), rgba(168,106,123,0.1));
  border-radius: 50% 0 50% 0;
  animation: petalFall linear infinite;
  opacity: 0;
}
@keyframes petalFall {
  0%   { opacity:0; transform: translateX(0) rotate(0deg); top: -30px; }
  10%  { opacity:.7; }
  90%  { opacity:.4; }
  100% { opacity:0; transform: translateX(80px) rotate(360deg); top: 110vh; }
}

.login-container {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.login-card {
  background: rgba(10,10,10,0.95);
  border: 1px solid #1c1c1c;
  border-radius: 20px;
  padding: 36px 32px;
  width: 100%; max-width: 400px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.9), 0 0 60px var(--pink-glow);
  animation: slideUp .4s ease;
}

.login-logo {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; margin-bottom: 28px; text-align: center;
}
.login-logo img {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid var(--pink-dim);
  box-shadow: 0 0 30px var(--pink-glow);
  animation: glow 3s ease infinite;
}
.login-logo h1 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.login-logo p  { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }

.btn-discord {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 16px;
  background: #5865F2; color: #fff;
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-discord:hover { background: #4752c4; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(88,101,242,0.4); }
.discord-icon { width: 20px; height: 20px; }

.login-hint {
  font-size: 11px; color: #2a2a2a;
  text-align: center; margin-top: 20px;
}
.login-info p { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.login-error {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(168,106,123,.10); border: 1px solid var(--pink-border);
  color: var(--pink-bright); border-radius: 8px;
  padding: .625rem .875rem; font-size: .875rem; margin-bottom: 1rem;
}

/* ── Abgaben (Pflichtabgaben) ────────────────────────── */
.pa-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .pa-layout { grid-template-columns: 1fr; } }

.pa-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pa-panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.pa-panel-header h3 { font-size: 14px; font-weight: 700; }
.pa-panel-header .icon { font-size: 16px; }

.pa-panel-body { padding: 16px 18px; }

.pa-goal-form { display: flex; flex-direction: column; gap: 14px; }
.pa-goal-form .form-label { color: var(--text-muted); font-size: 11.5px; font-weight: 600; }

.pa-progress-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pa-progress-label { font-size: 12px; color: var(--text-muted); }
.pa-progress-count { font-size: 14px; font-weight: 700; color: var(--pink-bright); }

.pa-member-list { display: flex; flex-direction: column; }
.pa-member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}
.pa-member-row:last-child { border-bottom: none; }
.pa-member-row:hover { background: var(--bg-elevated); }
.pa-member-row.checked { background: rgba(34,197,94,.04); }

.pa-member-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 1.5px solid var(--border);
  flex-shrink: 0; position: relative;
}
.pa-member-avatar-wrap { position: relative; flex-shrink: 0; }
.pa-member-check-icon {
  position: absolute; bottom: -2px; right: -2px;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px;
}
.pa-member-check-icon.done { background: var(--green); color: #000; }
.pa-member-check-icon.open { background: #ef4444; color: #fff; }

.pa-member-info { flex: 1; min-width: 0; }
.pa-member-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pa-member-role { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

.pa-search-wrap {
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.pa-search-wrap input { background: var(--bg-elevated); flex: 1; }

/* ── Dashboard Charts ────────────────────────────────── */
.dash-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 1100px) { .dash-charts-row { grid-template-columns: 1fr; } }

.dash-chart-card { min-height: 260px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 960px) { .dash-grid { grid-template-columns: 1fr; } }

/* ── Familien-Abgaben widget ─────────────────────────── */
.familien-table { width: 100%; }
.familien-table th { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 8px 0; }
.familien-table td { padding: 10px 0; border-top: 1px solid var(--border-subtle); font-size: 13px; }
.familien-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; background: var(--pink-bg); color: var(--pink-bright); border: 1px solid var(--pink-border); }

/* ── Route Card ──────────────────────────────────────── */
.routen-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted);
  margin-bottom: 12px;
}
.routen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.route-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, box-shadow .15s;
  animation: fadeUp .3s ease both;
}
.route-card:hover { border-color: var(--pink-dim); box-shadow: 0 2px 16px rgba(0,0,0,0.3); }
.route-card-head { display: flex; align-items: flex-start; gap: 10px; }
.route-card-emoji { font-size: 26px; line-height: 1; flex-shrink: 0; }
.route-card-title { flex: 1; }
.route-card-title h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.route-card-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.route-card-people { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 2px; }
.route-card-people span strong { color: var(--text-primary); }
.route-card-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 2px; }
.badge-eigene { background: rgba(34,197,94,0.10); color: #4ade80; border: 1px solid rgba(34,197,94,0.22); font-size: 10px; padding: 1px 7px; border-radius: 20px; }
.badge-fremd  { background: rgba(148,163,184,0.08); color: var(--text-muted); border: 1px solid var(--border); font-size: 10px; padding: 1px 7px; border-radius: 20px; }

.route-besitzer-block {
  background: var(--bg-elevated);
  border-radius: 8px; padding: 8px 12px;
  display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--border-subtle);
}
.route-besitzer-row { display: flex; align-items: center; gap: 7px; }
.route-besitzer-icon { font-size: 14px; flex-shrink: 0; }
.route-besitzer-label { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }
.route-besitzer-name { font-size: 13px; color: var(--text-primary); }
.route-notiz-row { display: flex; align-items: flex-start; gap: 7px; }

/* Route Teilnehmer block */
.route-teilnehmer-block {
  background: var(--bg-elevated);
  border-radius: 8px; padding: 8px 12px;
  border: 1px solid var(--border-subtle);
}
.route-teilnehmer-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0; font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.route-teilnehmer-row:last-child { border-bottom: none; }
.route-teilnehmer-fam { color: var(--pink-bright); font-weight: 600; }
.route-teilnehmer-abg { color: var(--text-muted); font-size: 11px; }

/* ── Sektionen Editor ────────────────────────────────── */
.sektion-editor-block {
  background: var(--bg-elevated); border-radius: 8px;
  border: 1px solid var(--border); padding: 12px;
  margin-bottom: 10px; position: relative;
}
.sektion-editor-block .sektion-move-handle {
  cursor: grab; color: var(--text-muted); font-size: 16px;
  position: absolute; left: 8px; top: 12px;
}
.sektion-editor-inner { padding-left: 22px; }
.sektion-img-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.sektion-img-row { display: flex; gap: 6px; align-items: center; }
.sektion-img-row input { flex: 1; font-size: 11px; font-family: monospace; }
.sektion-img-preview { max-height: 40px; border-radius: 4px; border: 1px solid var(--border); display: block; margin-top: 3px; }

/* ── Detail Modal ────────────────────────────────────── */
.detail-intro {
  background: var(--bg-elevated); border-radius: 8px;
  padding: 12px 14px; font-size: 13px; line-height: 1.7;
  margin-bottom: 16px; white-space: pre-wrap; color: var(--text-secondary);
}
.detail-section { margin-bottom: 20px; }
.detail-section-title { font-size: 13px; font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.detail-section-rolle { font-size: 11px; color: var(--pink); margin-bottom: 6px; }
.detail-section-desc  { font-size: 12px; color: var(--text-muted); white-space: pre-wrap; margin-bottom: 8px; }
.detail-section-imgs  { display: flex; flex-direction: column; gap: 8px; }
.detail-section-imgs img { width: 100%; border-radius: 8px; border: 1px solid var(--border); display: block; }

/* ── Misc helpers ────────────────────────────────────── */
.text-muted    { color: var(--text-muted) !important; }
.text-pink     { color: var(--pink) !important; }
.text-success  { color: var(--green) !important; }
.text-danger   { color: #ef4444 !important; }
.text-warning  { color: var(--orange) !important; }

.anim-card { animation: fadeUp .35s ease both; animation-delay: var(--d, 0s); }

/* ── Schutzgelder / Finanzen ─────────────────────────── */
.sg-charts-row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
@media (max-width: 768px) { .sg-charts-row { grid-template-columns: 1fr; } }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.arb-stat-grid { grid-template-columns: repeat(2, 1fr); }
.stat-arb-ok   { border-color: rgba(168,106,123,.2) !important; }
.stat-arb-fest { border-color: rgba(168,85,247,.2) !important; }
.stat-arb-warn { border-color: rgba(249,115,22,.2) !important; }
.stat-fin-normal { border-color: rgba(34,197,94,.2) !important; }
.stat-fin-schwarz { border-color: rgba(168,106,123,.2) !important; }

/* ── 403 page ────────────────────────────────────────── */
.error-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; text-align: center; padding: 20px;
}
.error-page h1 { font-size: 64px; font-weight: 900; color: var(--pink); }
.error-page h2 { font-size: 20px; font-weight: 700; }
.error-page p  { color: var(--text-muted); max-width: 400px; }

/* ── Abgaben Admin (checkbox toggle style) ───────────── */
.abg-btn-done { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.25); font-size: 12px; padding: 5px 12px; border-radius: 20px; cursor: pointer; white-space: nowrap; transition: all var(--transition); }
.abg-btn-done:hover { background: rgba(34,197,94,.25); }
.abg-btn-open { background: var(--pink-bg); color: var(--pink-bright); border: 1px solid var(--pink-border); font-size: 12px; padding: 5px 12px; border-radius: 20px; cursor: pointer; white-space: nowrap; transition: all var(--transition); }
.abg-btn-open:hover { background: rgba(168,106,123,.22); }

/* ── Dashboard card variants ─────────────────────────── */
.card-danger  { border-color: rgba(239,68,68,.2) !important; }
.card-warning { border-color: rgba(249,115,22,.2) !important; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-body { }
.card-body.p-0 { padding: 0; }

/* ── Dashboard activity list ─────────────────────────── */
.activity-list { display: flex; flex-direction: column; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--bg-elevated); }
.activity-icon { font-size: 18px; flex-shrink: 0; width: 28px; text-align: center; }
.activity-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.activity-action { font-size: 12.5px; font-weight: 600; }
.activity-detail { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-meta { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; gap: 2px; }
.activity-user { font-size: 11px; color: var(--pink); }
.activity-time { font-size: 10px; color: var(--text-muted); white-space: nowrap; }

/* ── dashboard grid ──────────────────────────────────── */
.dashboard-grid { display: flex; flex-direction: column; gap: 16px; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── text helpers ────────────────────────────────────── */
.text-gold    { color: var(--pink-bright) !important; }
.badge-gold   { background: var(--pink-bg); color: var(--pink-bright); border: 1px solid var(--pink-border); font-size: 11px; padding: 2px 8px; border-radius: 20px; display: inline-block; }
.badge-type   { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); font-size: 10px; padding: 1px 7px; border-radius: 20px; }

/* ── input-sm ────────────────────────────────────────── */
.input-sm { padding: 5px 8px; font-size: 12px; }

/* ── p-0 helper ──────────────────────────────────────── */
.p-0 { padding: 0 !important; }
