/* ============================================
   SBY - Admin Panel Stilleri
   ============================================ */

/* ── LAYOUT ── */
.admin-layout { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── İSTATİSTİK KARTLARI ── */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.admin-stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 1rem;
  transition: var(--transition);
  border-left: 4px solid var(--primary);
}
.admin-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.admin-stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(155,89,182,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.admin-stat-val { font-size: 1.8rem; font-weight: 900; color: var(--primary); line-height: 1; }
.admin-stat-lbl { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; margin-top: 0.2rem; }

/* ── SEKMELİ NAV ── */
.admin-tabs {
  display: flex; gap: 0.4rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  box-shadow: var(--shadow);
  width: fit-content;
}
.admin-tab {
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.88rem; font-weight: 700;
  cursor: pointer; border: none; background: transparent;
  color: var(--text-muted); transition: var(--transition);
}
.admin-tab:hover { background: var(--bg2); color: var(--text); }
.admin-tab.active { background: var(--primary); color: #fff; }

/* ── KULLANICI TABLOSU ── */
.admin-toolbar {
  display: flex; gap: 0.75rem; align-items: center;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.admin-toolbar input  { max-width: 260px; }
.admin-toolbar select { width: auto; }

.admin-table {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-collapse: collapse;
}
.admin-table th {
  background: var(--bg2);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg2); }

.user-cell { display: flex; align-items: center; gap: 0.75rem; }
.user-cell-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-lt), var(--accent-lt));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; overflow: hidden; flex-shrink: 0;
}
.user-cell-name { font-weight: 700; font-size: 0.9rem; }
.user-cell-email { font-size: 0.75rem; color: var(--text-muted); }

/* Rol badge */
.role-badge {
  display: inline-block;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
}
.role-badge.admin  { background: rgba(155,89,182,0.15); color: var(--primary); }
.role-badge.parent { background: rgba(46,125,50,0.12);  color: #2e7d32; }
.role-badge.child  { background: rgba(233,30,140,0.12); color: var(--accent); }

/* Online badge */
.online-badge  { display:inline-flex;align-items:center;gap:4px;font-size:0.75rem;color:#2e7d32;font-weight:600; }
.online-badge::before { content:'';width:7px;height:7px;border-radius:50%;background:#2e7d32; }
.offline-text  { font-size:0.75rem;color:var(--text-muted); }

/* Aksiyon butonları */
.admin-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.btn-xs {
  padding: 0.25rem 0.6rem;
  border-radius: 6px; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--bg2); color: var(--text);
  transition: var(--transition); white-space: nowrap;
}
.btn-xs:hover { border-color: var(--primary); color: var(--primary); background: var(--bg2); }
.btn-xs.danger:hover { border-color: var(--danger); color: var(--danger); }

/* ── MODAL ── */
.admin-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  display: flex; align-items: center; justify-content: center;
}
.admin-modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: 90%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.admin-modal h3 { margin-bottom: 1rem; font-size: 1.1rem; }
.admin-modal .form-group { margin-bottom: 1rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-table th:nth-child(n+4),
  .admin-table td:nth-child(n+4) { display: none; }
}
