/* ===== PREMIUM TEMA ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root {
  --bg-ana:        #07080d;
  --bg-kart:       #0d0f18;
  --bg-kart2:      #111320;
  --bg-sidebar:    #08090e;
  --bg-input:      #161824;
  --border:        #1e2035;
  --border-glow:   #2a2d4a;
  --primary:       #5865f2;
  --primary-aci:   #4752c4;
  --primary-glow:  rgba(88,101,242,0.25);
  --grad-primary:  linear-gradient(135deg,#5865f2 0%,#7c3aed 100%);
  --grad-green:    linear-gradient(135deg,#22c55e 0%,#16a34a 100%);
  --grad-red:      linear-gradient(135deg,#ef4444 0%,#b91c1c 100%);
  --green:         #22c55e;
  --red:           #ef4444;
  --yellow:        #f59e0b;
  --purple:        #a855f7;
  --text:          #c8cad6;
  --text-muted:    #565870;
  --text-baslik:   #f0f1ff;
  --topbar-h:      58px;
  --sidebar-w:     248px;
  --radius:        12px;
  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 24px rgba(0,0,0,0.5);
  --shadow-glow:   0 0 24px rgba(88,101,242,0.12);
}

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

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-ana);
  background-image: radial-gradient(ellipse at 20% 0%, rgba(88,101,242,0.06) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 100%, rgba(124,58,237,0.04) 0%, transparent 50%);
  color: var(--text);
  display: flex;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: var(--bg-input);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.83em;
  border: 1px solid var(--border);
  color: #a5b4fc;
}

/* ===== AUTH ===== */
.auth-page { justify-content: center; align-items: center; }
.auth-container { width: 100%; max-width: 420px; padding: 24px; }
.auth-box {
  background: linear-gradient(145deg, #0e1020 0%, #0a0c16 100%);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  padding: 48px 36px;
  text-align: center;
  box-shadow: var(--shadow-md), var(--shadow-glow);
}
.auth-logo { margin-bottom: 20px; filter: drop-shadow(0 0 16px rgba(88,101,242,0.4)); }
.auth-box h1 { font-size: 1.6rem; color: var(--text-baslik); margin-bottom: 8px; font-weight: 700; letter-spacing: -0.3px; }
.auth-box p  { color: var(--text-muted); margin-bottom: 32px; }
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--grad-primary);
  color: #fff;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(88,101,242,0.4);
}
.btn-discord:hover { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(88,101,242,0.55); text-decoration: none; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #08090f 0%, #07080c 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(0,0,0,0.4);
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text-baslik);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.2px;
}
.sidebar-logo svg { filter: drop-shadow(0 0 8px rgba(88,101,242,0.5)); }
.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.18s;
  margin-bottom: 3px;
  position: relative;
}
.nav-item:hover  { background: rgba(255,255,255,0.04); color: var(--text); text-decoration: none; }
.nav-item.aktif  {
  background: linear-gradient(135deg, rgba(88,101,242,0.25) 0%, rgba(124,58,237,0.15) 100%);
  color: #a5b4fc;
  border: 1px solid rgba(88,101,242,0.2);
  box-shadow: 0 0 12px rgba(88,101,242,0.1);
}
.nav-item.aktif::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--grad-primary);
  border-radius: 0 3px 3px 0;
}
.nav-ikon { width: 18px; text-align: center; font-size: 1rem; }
.sidebar-alt {
  padding: 14px;
  border-top: 1px solid var(--border);
}
.kullanici-bilgi {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-glow); }
.btn-cikis {
  display: block;
  text-align: center;
  padding: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: all 0.18s;
}
.btn-cikis:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.3); color: #ef4444; text-decoration: none; }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  height: var(--topbar-h);
  background: rgba(8,9,14,0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sidebar-toggle {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.15s;
}
.sidebar-toggle:hover { color: var(--text); }
.versiyon-badge {
  background: rgba(88,101,242,0.1);
  color: #7c83e8;
  border: 1px solid rgba(88,101,242,0.2);
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.page-content { padding: 32px 36px; }

/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: 28px; }
.page-header h2 {
  font-size: 1.5rem;
  color: var(--text-baslik);
  font-weight: 700;
  letter-spacing: -0.4px;
  background: linear-gradient(135deg, #f0f1ff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-header p  { color: var(--text-muted); margin-top: 5px; font-size: 0.88rem; }
.detay-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.detay-aksiyonlar { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: linear-gradient(145deg, var(--bg-kart2) 0%, var(--bg-kart) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
}
.stat-card:hover { border-color: rgba(88,101,242,0.3); transform: translateY(-1px); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-icon.blue   { background: rgba(88,101,242,0.15); box-shadow: 0 0 16px rgba(88,101,242,0.15); }
.stat-icon.green  { background: rgba(34,197,94,0.15);  box-shadow: 0 0 16px rgba(34,197,94,0.12); }
.stat-icon.red    { background: rgba(239,68,68,0.15);  box-shadow: 0 0 16px rgba(239,68,68,0.12); }
.stat-icon.purple { background: rgba(168,85,247,0.15); box-shadow: 0 0 16px rgba(168,85,247,0.12); }
.stat-icon.yellow { background: rgba(245,158,11,0.15); box-shadow: 0 0 16px rgba(245,158,11,0.12); }
.stat-info { display: flex; flex-direction: column; min-width: 0; }
.stat-sayi { font-size: 1.55rem; font-weight: 700; color: var(--text-baslik); letter-spacing: -0.5px; }
.stat-etiket { font-size: 0.75rem; color: var(--text-muted); margin-top: 1px; }

/* ===== CARD ===== */
.card {
  background: linear-gradient(145deg, var(--bg-kart2) 0%, var(--bg-kart) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.07) 50%, transparent 100%);
  pointer-events: none;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.card-header h3 { font-size: 0.95rem; color: var(--text-baslik); font-weight: 600; }
.card-header small { color: var(--text-muted); font-size: 0.78rem; }

/* ===== BOT LISTE ===== */
.bot-liste { padding: 8px; }
.bot-kart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-radius: 8px;
  transition: background 0.15s;
}
.bot-kart:hover { background: var(--bg-input); }
.bot-kart-sol { display: flex; align-items: center; gap: 12px; }
.bot-kart-sol strong { display: block; color: var(--text-baslik); font-size: 0.9rem; }
.bot-kart-sol small  { color: var(--text-muted); font-size: 0.78rem; }
.bot-kart-sag { display: flex; align-items: center; gap: 8px; }
.bot-durum-nokta {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.bot-durum-nokta.yesil   { background: var(--green); box-shadow: 0 0 6px var(--green); }
.bot-durum-nokta.kirmizi { background: var(--red); }
.bot-durum-nokta.sari    { background: #faa81a; box-shadow: 0 0 6px #faa81a; animation: sari-nabiz 1.5s ease-in-out infinite; }
@keyframes sari-nabiz { 0%,100% { opacity:1; } 50% { opacity:0.5; } }
.bos-durum { padding: 40px; text-align: center; color: var(--text-muted); }
.bos-durum p { margin-bottom: 16px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.18s;
  color: #fff;
  background: var(--bg-input);
  text-decoration: none !important;
  letter-spacing: 0.1px;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.1) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.3); filter: brightness(1.1); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary  { background: var(--grad-primary); box-shadow: 0 2px 12px rgba(88,101,242,0.35); }
.btn-green    { background: var(--grad-green);   box-shadow: 0 2px 12px rgba(34,197,94,0.3); }
.btn-red      { background: var(--grad-red);     box-shadow: 0 2px 12px rgba(239,68,68,0.3); }
.btn-ikincil  { background: rgba(255,255,255,0.05); border: 1px solid var(--border-glow); }
.btn-ikincil:hover { background: rgba(255,255,255,0.08); }
.btn-sm       { padding: 5px 12px; font-size: 0.8rem; border-radius: 7px; }
.btn-grup     { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== ALERTS ===== */
.alert {
  padding: 13px 18px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-basari { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }
.alert-hata   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3); color: #f87171; }

/* ===== BADGES ===== */
.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-green  { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.badge-red    { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.badge-yellow { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.badge-gray   { background: rgba(130,130,150,0.12); color: #8b8da8; border: 1px solid rgba(130,130,150,0.2); }
.badge-yesil  { background: rgba(34,197,94,0.15);  color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.badge-kirmizi { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }

/* ===== FORMS ===== */
.form-card  { padding: 24px; }
.form-grup  { margin-bottom: 18px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grup label { display: block; margin-bottom: 7px; font-size: 0.85rem; color: var(--text); font-weight: 500; letter-spacing: 0.1px; }
.form-grup input,
.form-grup textarea,
.form-grup select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glow);
  border-radius: 9px;
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.88rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
.form-grup input:focus,
.form-grup textarea:focus,
.form-grup select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-grup small { display: block; margin-top: 5px; font-size: 0.77rem; color: var(--text-muted); }
.zorunlu { color: var(--red); }
.input-goz { position: relative; }
.input-goz input { padding-right: 44px; }
.goz-btn {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; font-size: 1rem;
}
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.json-editor {
  width: 100%;
  background: #0d0f14;
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  color: #a8ff80;
  font-family: 'Consolas', monospace;
  font-size: 0.85rem;
  padding: 16px;
  resize: vertical;
  border-top: none;
}

/* ===== TABS ===== */
.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 2px;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 11px 18px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 500;
  transition: all 0.18s;
  margin-bottom: -1px;
  font-family: inherit;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.aktif { color: #a5b4fc; border-bottom-color: var(--primary); }
.tab-icerik { margin-top: 18px; }

/* ===== TABLE ===== */
.tablo { width: 100%; border-collapse: collapse; }
.tablo th {
  text-align: left;
  padding: 12px 18px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.015);
}
.tablo td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.87rem;
  vertical-align: middle;
}
.tablo tr:last-child td { border-bottom: none; }
.tablo tr:hover td { background: rgba(255,255,255,0.02); }
.tablo-aksiyonlar { display: flex; gap: 6px; }

/* ===== LOGS ===== */
.log-kutusu {
  background: #0d0f14;
  border-radius: 0 0 10px 10px;
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Consolas', monospace;
  font-size: 0.82rem;
  color: #a8ff80;
}
.log-kutusu pre { white-space: pre-wrap; word-break: break-all; }

/* ===== BİLGİ CARD ===== */
.bilgi-card { padding: 20px 24px; }
.bilgi-card h4 { color: var(--text-baslik); margin-bottom: 12px; }
.bilgi-card ol { padding-left: 20px; color: var(--text-muted); }
.bilgi-card li { margin-bottom: 6px; font-size: 0.9rem; }

/* ===== AYAR BÖLÜM ===== */
.ayar-bolum { margin-bottom: 20px; }
.ayar-bolum .form-card { padding: 20px 24px; }

/* ===== TOGGLE SWITCH ===== */
.toggle-satir {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.toggle-baslik {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.toggle-aciklama {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 26px;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 4px;
  top: 4px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}
.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.35);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .sidebar.acik { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .toggle-satir { flex-direction: column; align-items: flex-start; }
}
