/* admin.css – MYMAP Admin Panel v1.1.0 */

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

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  min-height: 100vh;
}

/* ── Header ── */
.admin-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.admin-header-left { display: flex; align-items: center; gap: 10px; }
.admin-logo { font-size: 17px; font-weight: 700; color: #2563eb; }
.admin-badge {
  background: #dbeafe; color: #1d4ed8;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 99px; letter-spacing: 0.5px;
}
.btn-back {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 7px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  color: #475569; font-size: 12px; cursor: pointer;
  text-decoration: none; transition: all 0.15s;
}
.btn-back:hover { background: #e2e8f0; color: #1e293b; }

/* ── Layout ── */
.admin-main { max-width: 680px; margin: 0 auto; padding: 20px 16px; }

.admin-title { font-size: 18px; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.admin-sub { font-size: 12px; color: #64748b; margin-bottom: 18px; }

/* ── Stats ── */
.stats-row { display: flex; gap: 10px; margin-bottom: 18px; }
.stat-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 12px 14px; flex: 1;
  display: flex; flex-direction: column; gap: 2px;
}
.stat-top { display: flex; align-items: center; gap: 6px; }
.stat-icon { font-size: 16px; line-height: 1; }
.stat-num { font-size: 20px; font-weight: 700; color: #0f172a; line-height: 1; }
.stat-label { font-size: 11px; color: #64748b; }

/* ── Filter tabs ── */
.filter-row { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-btn {
  padding: 5px 13px; border-radius: 7px; border: 1px solid #e2e8f0;
  background: #fff; color: #475569; font-size: 12px; cursor: pointer;
  font-weight: 500; transition: all 0.15s;
}
.filter-btn:hover { background: #f1f5f9; }
.filter-btn.active { background: #2563eb; border-color: #2563eb; color: #fff; }

/* ── User Cards ── */
.users-list { display: flex; flex-direction: column; gap: 8px; }

.user-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 13px 14px;
  display: flex; align-items: center; gap: 12px;
  transition: box-shadow 0.15s;
}
.user-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.user-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; background: #e2e8f0;
}
.user-avatar-placeholder {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-weight: 600; font-size: 13px; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.user-email { font-size: 11px; color: #94a3b8; }

/* ── Badges ── */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 700;
}
.badge-admin    { background: #fef3c7; color: #92400e; }
.badge-editor   { background: #d1fae5; color: #065f46; }
.badge-user     { background: #e0e7ff; color: #3730a3; }
.badge-pending  { background: #fde8d8; color: #9a3412; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-ok       { background: #dcfce7; color: #166534; }

/* ── Actions ── */
.user-actions { display: flex; gap: 5px; align-items: center; flex-shrink: 0; }
.btn-icon {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid #e2e8f0;
  background: #f8fafc; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.btn-approve { border-color: #bbf7d0; background: #f0fdf4; }
.btn-approve:hover { background: #16a34a; border-color: #16a34a; }
.btn-reject  { border-color: #fecaca; background: #fff1f2; }
.btn-reject:hover  { background: #dc2626; border-color: #dc2626; }
.btn-delete:hover  { background: #dc2626; border-color: #dc2626; }

.role-select {
  height: 30px; padding: 0 8px; border-radius: 7px;
  border: 1px solid #c7d2fe; font-size: 11px;
  background: #eff6ff; color: #1e40af; cursor: pointer;
}

/* ── Empty ── */
.empty-card {
  text-align: center; padding: 32px; color: #94a3b8;
  font-size: 13px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
}

/* ── Toast ── */
#admin-toast {
  position: fixed; bottom: 16px; right: 16px;
  background: #0f172a; color: #fff;
  padding: 9px 16px; border-radius: 9px;
  font-size: 12px; transform: translateY(80px);
  opacity: 0; transition: all 0.3s; z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
#admin-toast.show { transform: translateY(0); opacity: 1; }
#admin-toast.success { background: #059669; }
#admin-toast.error   { background: #dc2626; }
