/* Admin Panel Styles */

/* Form inputs - admin'e özel */
.admin-main .form-group { margin-bottom: 0.75rem; }
.admin-main .form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.05em; }
.admin-main .form-group input,
.admin-main .form-group select,
.admin-main .form-group textarea {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.admin-main .form-group input:focus,
.admin-main .form-group select:focus { border-color: var(--accent); }

/* === GÖRSEL YÜKLEME UI === */
.form-label-upload {
  display: block;
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* Upload kutusu - temel */
.img-upload-box {
  border: 2px dashed rgba(124,58,237,0.3);
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  background: rgba(124,58,237,0.04);
}
.img-upload-box:hover {
  border-color: rgba(124,58,237,0.6);
  background: rgba(124,58,237,0.08);
  box-shadow: 0 0 20px rgba(124,58,237,0.12);
}
.img-upload-box.drag-over {
  border-color: var(--accent);
  background: rgba(124,58,237,0.12);
  box-shadow: 0 0 30px rgba(124,58,237,0.2);
}
.img-upload-box.has-image {
  border-color: rgba(16,185,129,0.4);
  background: transparent;
}

/* Logo yükleme — kare */
.img-upload-logo { width: 100%; height: 130px; }

/* Banner yükleme — geniş */
.img-upload-banner { width: 100%; height: 130px; }

/* Placeholder içeriği */
.img-upload-preview {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 100%; padding: 0.75rem;
  text-align: center;
}
.img-upload-icon  { font-size: 1.75rem; margin-bottom: 0.4rem; opacity: 0.5; }
.img-upload-text  { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.2rem; }
.img-upload-hint  { font-size: 0.65rem; color: var(--text-secondary); opacity: 0.6; }

/* Resim önizleme — yüklenince */
.img-upload-box img.upload-img-preview {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* Overlay — resim üzerine hov */
.img-upload-box .upload-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
  border-radius: 12px;
  font-size: 0.75rem; font-weight: 700; color: #fff;
  gap: 0.5rem;
}
.img-upload-box.has-image:hover .upload-overlay { opacity: 1; }

body { background: var(--bg-primary); }

.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.5rem 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  position: relative;
}
.admin-nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.admin-nav-item.active { background: var(--accent); color: #fff; }
.pending-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 100px;
  min-width: 18px;
  text-align: center;
}
.admin-sidebar-footer { padding-top: 1rem; border-top: 1px solid var(--border-light); }
.admin-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border-radius: 10px;
}
.admin-user-info .avatar { font-size: 1.5rem; }
.admin-user-info .name { font-size: 0.875rem; font-weight: 600; }
.admin-user-info .role { font-size: 0.7rem; color: var(--gold); font-weight: 700; text-transform: uppercase; }

/* Main */
.admin-main {
  padding: 2rem;
  overflow-y: auto;
}
.admin-section { display: none; animation: pageIn 0.3s ease; }
.admin-section.active { display: block; }
.admin-page-header {
  margin-bottom: 2rem;
}
.admin-page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.admin-page-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Stat Grid */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}
.admin-stat-card:hover { border-color: var(--border); transform: translateY(-2px); }
.admin-stat-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.admin-stat-val { font-size: 2rem; font-weight: 800; color: var(--accent2); margin-bottom: 0.25rem; }
.admin-stat-label { font-size: 0.8rem; color: var(--text-secondary); }

/* Cards */
.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.admin-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Table */
.admin-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  background: var(--bg-secondary);
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}
.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.875rem;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-secondary); }

/* Pending Cards */
.pending-card {
  background: var(--bg-card);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}
.pending-logo { font-size: 2.5rem; width: 60px; text-align: center; flex-shrink: 0; }
.pending-info { flex: 1; }
.pending-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }
.pending-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.pending-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-secondary); }
.pending-actions { display: flex; gap: 0.5rem; flex-direction: column; flex-shrink: 0; }

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border-light);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 2px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: all 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); background: #fff; }

/* Bar Chart */
.bar-chart { display: flex; flex-direction: column; gap: 0.75rem; }
.bar-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; }
.bar-label { min-width: 120px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; background: var(--bg-secondary); border-radius: 100px; height: 8px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width 0.8s ease; }
.bar-val { min-width: 40px; text-align: right; color: var(--accent2); font-weight: 600; }

/* Status Badge */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.status-online { background: var(--green); }
.status-pending { background: var(--gold); }

/* Ad Package */
.ad-package {
  background: var(--bg-secondary);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}
.ad-package-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
.ad-package-desc { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.ad-package-price { font-size: 1rem; font-weight: 800; color: var(--gold); }

/* Table actions */
.table-actions { display: flex; gap: 0.4rem; }
.table-logo { font-size: 1.5rem; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { height: auto; position: static; }
  .admin-grid-2 { grid-template-columns: 1fr; }
}
