/* Panel Ana CSS - Instagram Takipçi Havuz Paneli */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,400&display=swap');

:root {
  --sidebar-w: 260px;
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121e;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1f1f35;
  --accent-1: #e91e63;
  --accent-2: #9c27b0;
  --accent-gradient: linear-gradient(135deg, #e91e63, #9c27b0);
  --accent-gradient-soft: linear-gradient(135deg, rgba(233,30,99,.15), rgba(156,39,176,.15));
  --text-primary: #f0f0ff;
  --text-secondary: #8888aa;
  --text-muted: #55556a;
  --border: rgba(255,255,255,.06);
  --border-focus: rgba(233,30,99,.5);
  --shadow: 0 8px 32px rgba(0,0,0,.4);
  --radius: 14px;
  --radius-sm: 8px;
  --font-main: 'DM Sans', sans-serif;
  --font-head: 'Syne', sans-serif;
  --transition: .2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* ─── SIDEBAR ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 1000;
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  width: 36px; height: 36px;
  background: var(--accent-gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}

.brand-text { color: var(--text-primary); }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.user-avatar {
  width: 38px; height: 38px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

.user-name { display: block; font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.user-role { display: block; font-size: .75rem; color: var(--text-secondary); }

.credit-badge {
  margin: 12px 16px;
  background: var(--accent-gradient-soft);
  border: 1px solid rgba(233,30,99,.3);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  font-size: .9rem;
  color: #f48fb1;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: .9rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
}

.nav-item i { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }

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

.nav-item.active {
  background: var(--accent-gradient-soft);
  color: #f48fb1;
  border: 1px solid rgba(233,30,99,.2);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

/* ─── MAIN CONTENT ───────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  flex: 1;
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.btn-mobile-menu {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
}

.content-area {
  flex: 1;
  padding: 28px;
}

/* ─── CARDS ──────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
}

.card-body { padding: 22px; }

/* Stat Cards */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0; height: 2px;
  background: var(--accent-gradient);
}

.stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,.5); }

.stat-icon {
  width: 48px; height: 48px;
  background: var(--accent-gradient-soft);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--accent-1);
  margin-bottom: 14px;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
}

/* ─── FORMS ──────────────────────────────────────── */
.form-control, .form-select {
  background: var(--bg-primary);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 11px 14px;
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus, .form-select:focus {
  background: var(--bg-primary);
  border-color: var(--border-focus);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(233,30,99,.15);
}

.form-control::placeholder { color: var(--text-muted); }

.form-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ─── BUTTONS ────────────────────────────────────── */
.btn-accent {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 24px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-accent:hover { opacity: .9; transform: translateY(-1px); color: #fff; }
.btn-accent:active { transform: translateY(0); }

.btn-outline-accent {
  background: transparent;
  color: var(--accent-1);
  border: 1px solid var(--accent-1);
  border-radius: var(--radius-sm);
  padding: 10px 22px;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline-accent:hover {
  background: var(--accent-1);
  color: #fff;
}

/* ─── TABLE ──────────────────────────────────────── */
.table {
  color: var(--text-primary);
  border-color: var(--border);
}

.table thead th {
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  padding: 12px 16px;
  border-color: var(--border);
}

.table tbody td {
  padding: 13px 16px;
  border-color: var(--border);
  vertical-align: middle;
  font-size: .88rem;
}

.table tbody tr { transition: background var(--transition); }
.table tbody tr:hover { background: rgba(255,255,255,.03); }

/* ─── BADGES ─────────────────────────────────────── */
.badge { font-size: .75rem; padding: 5px 10px; border-radius: 6px; font-weight: 600; }

/* ─── MOBILE ─────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
  backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.active {
    display: block;
  }
  .main-content {
    margin-left: 0;
  }
  .btn-mobile-menu {
    display: block;
  }
  .content-area {
    padding: 16px;
  }
}

/* ─── AUTH PAGES ─────────────────────────────────── */
.auth-bg {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.auth-bg::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(233,30,99,.12) 0%, transparent 70%);
  top: -200px; right: -200px;
  pointer-events: none;
}

.auth-bg::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(156,39,176,.1) 0%, transparent 70%);
  bottom: -200px; left: -200px;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo .logo-icon {
  width: 64px; height: 64px;
  background: var(--accent-gradient);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.auth-logo h1 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
}

.auth-logo p { color: var(--text-secondary); font-size: .9rem; }

/* ─── TERMS MODAL ────────────────────────────────── */
.terms-box {
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-size: .85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* ─── PROFILE PREVIEW ────────────────────────────── */
.ig-profile-preview {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}

.ig-profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

.ig-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.ig-profile-info h5 {
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0 0 4px;
}

.ig-profile-stats { display: flex; gap: 16px; margin-top: 8px; }
.ig-stat { text-align: center; }
.ig-stat-num { font-weight: 700; font-size: 1rem; display: block; }
.ig-stat-lbl { font-size: .75rem; color: var(--text-secondary); }

/* ─── CODE BLOCK ─────────────────────────────────── */
.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  color: #a5d6a7;
  word-break: break-all;
  position: relative;
}

/* ─── SCROLLBAR ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ─── UTILS ──────────────────────────────────────── */
.text-accent { color: var(--accent-1) !important; }
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.divider { border-top: 1px solid var(--border); margin: 16px 0; }

/* Admin specific overrides */
.admin-sidebar .sidebar { background: #0d0d1a; }

/* Alert overrides */
.alert { border-radius: var(--radius-sm); font-size: .9rem; }
.alert-success { background: rgba(46,125,50,.15); border-color: rgba(46,125,50,.4); color: #a5d6a7; }
.alert-danger  { background: rgba(183,28,28,.15); border-color: rgba(183,28,28,.4); color: #ef9a9a; }
.alert-warning { background: rgba(230,81,0,.15);  border-color: rgba(230,81,0,.4);  color: #ffcc80; }
.alert-info    { background: rgba(1,87,155,.15);   border-color: rgba(1,87,155,.4);  color: #80d8ff; }

/* Spinner */
.spinner-sm {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Range slider */
input[type=range] { accent-color: var(--accent-1); }

/* Select dark */
.form-select option { background: var(--bg-card); color: var(--text-primary); }

/* Pagination */
.page-link {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-secondary);
}
.page-link:hover, .page-item.active .page-link {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: #fff;
}

/* Modal dark */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
}
.modal-header { border-bottom: 1px solid var(--border); }
.modal-footer { border-top: 1px solid var(--border); }
.btn-close { filter: invert(1); }
