/* ── SAL Bot Dashboard — Redesign 2.0 ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary:    #0f0f1a;
  --bg-secondary:  #161625;
  --bg-tertiary:   #1e1e35;
  --bg-card:       #1a1a2e;
  --accent-purple: #8b5cf6;
  --accent-pink:   #f72585;
  --accent-grad:   linear-gradient(135deg, #8b5cf6 0%, #c026d3 50%, #f72585 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(247,37,133,0.15));
  --text-primary:  #e2e8f0;
  --text-muted:    #64748b;
  --text-soft:     #94a3b8;
  --border-color:  rgba(139,92,246,0.18);
  --border-soft:   rgba(255,255,255,0.06);
  --shadow-purple: 0 0 30px rgba(139,92,246,0.15);
  --shadow-card:   0 4px 24px rgba(0,0,0,0.4);
  --radius-lg:     16px;
  --radius-xl:     20px;
  --transition:    all 0.2s cubic-bezier(.4,0,.2,1);
}

/* ── Reset & Base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  font-size: 0.925rem;
  line-height: 1.6;
}
#wrapper { min-height: 100vh; }

/* ── Scrollbar ────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: linear-gradient(#8b5cf6, #f72585); border-radius: 999px; }

/* ── Sidebar ──────────────────────────────────────────────────────────── */
#sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.sal-logo {
  font-size: 1.6rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 8px rgba(139,92,246,0.5));
}
.sidebar-brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-guild {
  margin: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
}
.sidebar-guild-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 4px 10px; }
.sidebar-section {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 14px 6px 4px;
}
.sidebar-nav .nav-link {
  color: var(--text-soft);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 2px;
}
.sidebar-nav .nav-link i { font-size: 1rem; flex-shrink: 0; }
.sidebar-nav .nav-link:hover {
  color: var(--text-primary);
  background: rgba(139,92,246,0.12);
}
.sidebar-nav .nav-link.active {
  color: #fff;
  background: var(--accent-grad);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(139,92,246,0.35);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  margin-top: auto;
}
.sidebar-user-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Hauptinhalt ─────────────────────────────────────────────────────── */
#main-content {
  min-width: 0;
  padding: 28px 32px;
}

.page-header { margin-bottom: 24px; }
.page-header h2 { font-size: 1.7rem; font-weight: 800; margin-bottom: 2px; }

/* ── Gradient Text ────────────────────────────────────────────────────── */
.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glassmorphism Karten ─────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: rgba(139,92,246,0.25);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), var(--shadow-purple);
}

/* Legacy .dash-card still works */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

/* ── Stat-Karten ──────────────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-grad);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.5), var(--shadow-purple); }
.stat-icon { font-size: 1.6rem; margin-bottom: 8px; }
.stat-value { font-size: 2.2rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.82rem; color: var(--text-muted); }

/* ── Guild-Karte (Server-Auswahl) ─────────────────────────────────────── */
.guild-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
}
.guild-card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(139,92,246,0.25);
  color: var(--text-primary);
}
.guild-icon-placeholder {
  width: 52px; height: 52px;
  background: var(--accent-grad);
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Login-Seite ──────────────────────────────────────────────────────── */
.login-page { background: var(--bg-primary); }
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), var(--shadow-purple);
}
.sal-logo-big {
  font-size: 5rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(139,92,246,0.6));
  display: block;
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-soft);
}
.feature-item i { color: var(--accent-purple); }

/* ── Tabellen ─────────────────────────────────────────────────────────── */
.table { color: var(--text-primary); }
.table > :not(caption) > * > * {
  background: transparent;
  border-bottom-color: var(--border-soft);
  color: var(--text-primary);
  padding: 12px 14px;
}
.table thead > tr > * {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  border-bottom-color: var(--border-color);
}
.table-hover tbody tr:hover > * {
  background: rgba(139,92,246,0.06);
  cursor: default;
}

/* ── Formulare ────────────────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--bg-tertiary);
  border-color: var(--border-soft);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 10px 14px;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  background: var(--bg-tertiary);
  border-color: var(--accent-purple);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.2);
}
.form-control::placeholder { color: var(--text-muted); }
.form-label { font-weight: 600; font-size: 0.875rem; color: var(--text-soft); margin-bottom: 6px; }

.input-group-text {
  background: var(--bg-tertiary);
  border-color: var(--border-soft);
  color: var(--text-muted);
  border-radius: 10px 0 0 10px;
}
.input-group .form-control { border-radius: 0 10px 10px 0; }

.form-check-input:checked {
  background-color: var(--accent-purple);
  border-color: var(--accent-purple);
}
.form-switch .form-check-input:checked {
  background-color: var(--accent-pink);
  border-color: var(--accent-pink);
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 9px 18px;
  transition: var(--transition);
}
.btn-purple {
  background: var(--accent-purple);
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(139,92,246,0.4);
}
.btn-purple:hover { background: #7c3aed; color: white; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(139,92,246,0.5); }

.btn-pink {
  background: var(--accent-pink);
  color: white;
  border: none;
  box-shadow: 0 4px 14px rgba(247,37,133,0.4);
}
.btn-pink:hover { background: #d41877; color: white; transform: translateY(-1px); }

.btn-grad {
  background: var(--accent-grad);
  color: white;
  border: none;
  box-shadow: 0 4px 20px rgba(139,92,246,0.4);
}
.btn-grad:hover { opacity: 0.9; color: white; transform: translateY(-1px); box-shadow: 0 8px 28px rgba(139,92,246,0.5); }

.btn-discord {
  background: #5865F2;
  color: white;
  border: none;
  font-size: 1rem;
  padding: 12px 28px;
  box-shadow: 0 4px 14px rgba(88,101,242,0.4);
}
.btn-discord:hover { background: #4752c4; color: white; transform: translateY(-1px); }

.btn-outline-secondary {
  border-color: var(--border-color);
  color: var(--text-soft);
}
.btn-outline-secondary:hover { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--accent-purple); }

/* ── Badges / Farben ──────────────────────────────────────────────────── */
.bg-purple { background-color: var(--accent-purple) !important; }
.bg-pink   { background-color: var(--accent-pink)   !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-pink   { color: var(--accent-pink)   !important; }
.badge { border-radius: 8px; font-weight: 600; }

/* ── Alerts ───────────────────────────────────────────────────────────── */
.alert {
  border-radius: 12px;
  border: none;
  font-weight: 500;
}
.alert-success {
  background: rgba(16,185,129,0.12);
  color: #6ee7b7;
  border-left: 3px solid #10b981;
}
.alert-danger {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border-left: 3px solid #ef4444;
}

/* ── Avatar ───────────────────────────────────────────────────────────── */
.avatar-placeholder {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.avatar-placeholder-sm {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--accent-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Settings-Seite spezifisch ────────────────────────────────────────── */
.invite-banner {
  background: var(--accent-grad-soft);
  border: 1px solid rgba(139,92,246,0.3);
}

.avatar-upload-wrapper {
  width: 96px; height: 96px;
  position: relative;
  cursor: pointer;
}
.avatar-upload-circle {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: var(--transition);
}
.avatar-upload-wrapper:hover .avatar-upload-circle {
  border-color: var(--accent-purple);
}
.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(139,92,246,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  opacity: 0;
  transition: var(--transition);
}
.avatar-upload-wrapper:hover .avatar-upload-overlay { opacity: 1; }

.status-radio-label { cursor: pointer; }
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: var(--transition);
  cursor: pointer;
}
.status-online   { background: rgba(67,181,129,0.15); color: #43b581; }
.status-idle     { background: rgba(250,166,26,0.15); color: #faa61a; }
.status-dnd      { background: rgba(240,71,71,0.15);  color: #f04747; }
.status-invisible{ background: rgba(116,127,141,0.15);color: #747f8d; }

input[name="status"]:checked + .status-badge { border-color: currentColor; box-shadow: 0 0 12px currentColor; }

.status-dot-preview {
  position: absolute;
  bottom: 2px; right: 2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-tertiary);
  background: #43b581;
}

.module-badge {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-soft);
  transition: var(--transition);
}
.dot-on  { width: 8px; height: 8px; border-radius: 50%; background: #43b581; flex-shrink: 0; }
.dot-off { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }

/* ── Responsiv ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar { width: 100%; height: auto; position: relative; min-height: unset; }
  #wrapper { flex-direction: column; }
  #main-content { padding: 16px; }
}
