/* AnonDKrypto Admin Dashboard — Design System v2
   Farben: DESIGN.md | Font: Space Grotesk */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --bg:         #0C1A2E;
  --bg-card:    #0D1F35;
  --bg-hover:   #112540;
  --border:     rgba(0, 191, 255, 0.15);
  --border-hover: rgba(0, 191, 255, 0.35);
  --cyan:       #00BFFF;
  --cyan-dim:   rgba(0, 191, 255, 0.15);
  --gold:       #E8B630;
  --gold-dim:   rgba(232, 182, 48, 0.15);
  --text:       #E8EDF5;
  --text-muted: #8899AA;
  --green:      #22C55E;
  --red:        #EF4444;
  --radius:     10px;
}

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

body {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
}

/* ── Glow Orbs (subtiler Hintergrund-Effekt) ── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px; height: 600px;
  background: var(--cyan);
  top: -200px; left: -100px;
}
body::after {
  width: 500px; height: 500px;
  background: var(--gold);
  bottom: -150px; right: -100px;
}

/* ── Sidebar ─────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 220px;
  height: 100vh;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo span {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(90deg, #fff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.3px;
}

.sidebar-logo small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 3px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.nav-item.active {
  color: var(--cyan);
  background: var(--bg-hover);
  border-left-color: var(--cyan);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Main Content ─────────────────────── */
.main {
  margin-left: 220px;
  padding: 32px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.page { display: none; }
.page.active { display: block; }

/* ── Header ──────────────────────────── */
.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* ── Stats Grid ──────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: var(--border-hover);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--cyan);
  margin: 6px 0 2px;
  line-height: 1;
}

.stat-value.gold  { color: var(--gold); }
.stat-value.green { color: var(--green); }
.stat-value.white { color: var(--text); }

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Cards ───────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.card-body { padding: 20px; }

/* ── Table ───────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 191, 255, 0.06);
  font-size: 13px;
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-hover); }

/* ── Badges ──────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.badge-cyan  { background: var(--cyan-dim);              color: var(--cyan); }
.badge-green { background: rgba(34, 197, 94, 0.15);      color: var(--green); }
.badge-red   { background: rgba(239, 68, 68, 0.15);      color: var(--red); }
.badge-gold  { background: var(--gold-dim);               color: var(--gold); }
.badge-gray  { background: rgba(136, 153, 170, 0.1);     color: var(--text-muted); }

/* ── Buttons ─────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  position: relative;
  overflow: hidden;
}

/* Cyan Primary */
.btn-cyan {
  background: linear-gradient(135deg, var(--cyan) 0%, #0099CC 100%);
  color: #0C1A2E;
  box-shadow: 0 0 18px rgba(0,191,255,0.25);
}
.btn-cyan:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(0,191,255,0.45);
}

/* Gold (für Premium-Aktionen) */
.btn-gold {
  background: var(--gold);
  color: #0C1A2E;
  font-weight: 700;
}
.btn-gold:hover {
  background: #d4a428;
  transform: translateY(-1px);
}

/* Outline */
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px rgba(0,191,255,0.1);
}

/* Danger */
.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
  border: 1px solid transparent;
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.22); }

.btn-sm { padding: 4px 10px; font-size: 11px; }

/* ── Form ────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  background: rgba(12, 26, 46, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.1);
}

/* ── Modal ───────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 15, 26, 0.8);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: 420px;
  padding: 28px;
  box-shadow: 0 0 60px rgba(0,191,255,0.08), 0 24px 48px rgba(0,0,0,0.5);
}

.modal h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ── Toast ───────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  z-index: 300;
  display: none;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.toast.show   { display: flex; }
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }

/* ── Loading ─────────────────────────── */
.loading {
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
  text-align: center;
}

/* ── Login ───────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 360px;
  box-shadow: 0 0 60px rgba(0,191,255,0.08), 0 24px 48px rgba(0,0,0,0.4);
}

.login-box h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #fff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-box p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}

/* ── Bot Status Chip ─────────────────────────────── */
.bot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.bot-chip-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bot-chip.green  { background: rgba(34,197,94,0.12);  color: var(--green); }
.bot-chip.yellow { background: rgba(245,158,11,0.12); color: #F59E0B; }
.bot-chip.red    { background: rgba(239,68,68,0.12);  color: var(--red); }
.bot-chip.green  .bot-chip-dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.bot-chip.yellow .bot-chip-dot { background: #F59E0B;       box-shadow: 0 0 6px #F59E0B; }
.bot-chip.red    .bot-chip-dot { background: var(--red);    box-shadow: 0 0 6px var(--red); animation: pulse-dot 1.4s infinite; }

/* Bot-Chip im Team-Header — größer + zentriert */
.bot-chip-lg {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 24px;
}
.bot-chip-lg .bot-chip-dot { width: 10px; height: 10px; }

@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 4px var(--red); }
  50%      { box-shadow: 0 0 14px var(--red), 0 0 24px rgba(239,68,68,0.3); }
}

/* ── Positions Toggle ────────────────────────────── */
.pos-toggle {
  display: flex;
  margin-bottom: 20px;
  background: rgba(0,191,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
  gap: 0;
}
.pos-toggle-btn {
  padding: 6px 20px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: all 0.15s;
}
.pos-toggle-btn.active {
  background: var(--cyan-dim);
  color: var(--cyan);
  border: 1px solid rgba(0,191,255,0.25);
}
.pos-toggle-btn:not(.active):hover { color: var(--text); }
