/* Modern Admin Panel Styles */
:root {
  --admin-bg: #0a0c14;
  --admin-surface: #13151f;
  --admin-surface-2: #1a1d2e;
  --admin-surface-3: #252a3f;
  --admin-border: rgba(99, 102, 241, 0.1);
  --admin-text: #e2e8f0;
  --admin-text-dim: #94a3b8;
  --admin-primary: #6366f1;
  --admin-primary-hover: #4f46e5;
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
  --admin-danger: #ef4444;
  --admin-info: #3b82f6;
  --admin-shadow: rgba(0, 0, 0, 0.3);
  --admin-radius: 16px;
  --admin-radius-sm: 12px;
  --admin-radius-lg: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.admin-dashboard {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--admin-bg) 0%, #0d0f19 50%, #111320 100%);
  color: var(--admin-text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Layout Container */
.admin-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  max-width: 1920px;
  margin: 0 auto;
}

/* Sidebar */
.admin-sidebar {
  background: var(--admin-surface);
  border-right: 1px solid var(--admin-border);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-sidebar::-webkit-scrollbar {
  width: 6px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
  background: var(--admin-surface-3);
  border-radius: 3px;
}

/* Brand */
.admin-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--admin-border);
}

.admin-brand img {
  width: 140px;
  height: auto;
}

.admin-brand-text h1 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--admin-text);
  margin-bottom: 0.25rem;
}

.admin-brand-text p {
  font-size: 0.75rem;
  color: var(--admin-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* User Profile Card */
.admin-user-card {
  background: linear-gradient(135deg, var(--admin-primary) 0%, #8b5cf6 100%);
  border-radius: var(--admin-radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 8px 24px var(--admin-shadow);
}

.admin-user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  border: 3px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.admin-user-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}

.admin-user-info p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Navigation Menu */
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: var(--admin-radius-sm);
  color: var(--admin-text-dim);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.admin-nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--admin-primary);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.admin-nav-item:hover {
  background: var(--admin-surface-2);
  color: var(--admin-text);
  border-color: var(--admin-border);
}

.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-nav-item.active::before {
  transform: scaleY(1);
}

.admin-nav-item i {
  width: 20px;
  text-align: center;
  font-size: 1.125rem;
}

.admin-nav-item .badge {
  margin-left: auto;
  background: var(--admin-danger);
  color: #fff;
  padding: 0.125rem 0.5rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Logout Button */
.admin-logout {
  margin-top: auto;
  padding-top: 2rem;
  border-top: 1px solid var(--admin-border);
}

.admin-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem;
  border-radius: var(--admin-radius-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--admin-danger);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-logout-btn:hover {
  background: var(--admin-danger);
  color: #fff;
  border-color: var(--admin-danger);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Main Content */
.admin-main {
  padding: 2rem;
  overflow-y: auto;
}

/* Header */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--admin-border);
}

.admin-header-title h1 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--admin-primary) 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.admin-header-title p {
  font-size: 1rem;
  color: var(--admin-text-dim);
}

.admin-header-actions {
  display: flex;
  gap: 0.75rem;
}

/* Buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--admin-radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.admin-btn-primary {
  background: linear-gradient(135deg, var(--admin-primary) 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.admin-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.admin-btn-secondary {
  background: var(--admin-surface-2);
  color: var(--admin-text);
  border-color: var(--admin-border);
}

.admin-btn-secondary:hover {
  background: var(--admin-surface-3);
  transform: translateY(-2px);
}

/* Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  padding: 1.75rem;
  border: 1px solid var(--admin-border);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.admin-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--admin-primary), #8b5cf6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--admin-shadow);
}

.admin-stat-card:hover::before {
  opacity: 1;
}

.admin-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-stat-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--admin-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  color: var(--admin-primary);
}

.admin-stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--admin-text);
  margin-bottom: 0.5rem;
}

.admin-stat-change {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.admin-stat-change.positive {
  color: var(--admin-success);
}

.admin-stat-change.negative {
  color: var(--admin-danger);
}

/* Card/Panel */
.admin-card {
  background: var(--admin-surface);
  border-radius: var(--admin-radius);
  padding: 1.75rem;
  border: 1px solid var(--admin-border);
  margin-bottom: 1.5rem;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--admin-border);
}

.admin-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--admin-text);
}

/* Table */
.admin-table-container {
  overflow-x: auto;
  border-radius: var(--admin-radius);
  border: 1px solid var(--admin-border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.admin-table thead {
  background: var(--admin-surface-2);
}

.admin-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--admin-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--admin-border);
  color: var(--admin-text);
}

.admin-table tbody tr {
  transition: background 0.2s ease;
}

.admin-table tbody tr:hover {
  background: var(--admin-surface-2);
}

/* Badge */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 600;
}

.admin-badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--admin-success);
}

.admin-badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--admin-warning);
}

.admin-badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--admin-danger);
}

.admin-badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--admin-info);
}

/* User Badges in Admin Panel */
.admin-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  cursor: help;
  transition: all 300ms ease;
}

.admin-user-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: adminShimmer 3s infinite;
}

@keyframes adminShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.admin-user-badge:hover {
  transform: translateY(-2px) scale(1.05);
}

.admin-user-badge[data-badge="verified"] {
  animation: adminPulseBlue 2s infinite;
  box-shadow: 0 0 10px #3b82f6, 0 0 20px #3b82f6, 0 0 30px #3b82f6;
}
@keyframes adminPulseBlue {
  0%, 100% { box-shadow: 0 0 10px #3b82f6, 0 0 20px #3b82f6, 0 0 30px #3b82f6; }
  50% { box-shadow: 0 0 20px #3b82f6, 0 0 30px #3b82f6, 0 0 40px #3b82f6, 0 0 50px #3b82f6; }
}

.admin-user-badge[data-badge="premium"] {
  animation: adminPulseGold 2s infinite;
  box-shadow: 0 0 10px #f59e0b, 0 0 20px #f59e0b, 0 0 30px #f59e0b;
}
@keyframes adminPulseGold {
  0%, 100% { box-shadow: 0 0 10px #f59e0b, 0 0 20px #f59e0b, 0 0 30px #f59e0b; }
  50% { box-shadow: 0 0 20px #f59e0b, 0 0 30px #f59e0b, 0 0 40px #f59e0b, 0 0 50px #f59e0b; }
}

.admin-user-badge[data-badge="top-seller"] {
  animation: adminPulseGreen 1.5s infinite;
  box-shadow: 0 0 10px #10b981, 0 0 20px #10b981, 0 0 30px #10b981;
}
@keyframes adminPulseGreen {
  0%, 100% { box-shadow: 0 0 10px #10b981, 0 0 20px #10b981, 0 0 30px #10b981; }
  50% { box-shadow: 0 0 25px #10b981, 0 0 40px #10b981, 0 0 50px #10b981; }
}

.admin-user-badge[data-badge="trusted-seller"] {
  animation: adminPulseCyan 1.8s infinite;
  box-shadow: 0 0 10px #06b6d4, 0 0 20px #06b6d4, 0 0 30px #06b6d4;
}
@keyframes adminPulseCyan {
  0%, 100% { box-shadow: 0 0 10px #06b6d4, 0 0 20px #06b6d4, 0 0 30px #06b6d4; }
  50% { box-shadow: 0 0 20px #06b6d4, 0 0 35px #06b6d4, 0 0 50px #06b6d4; }
}

.admin-user-badge[data-badge="community-leader"] {
  animation: adminPulsePurple 2.2s infinite;
  box-shadow: 0 0 10px #8b5cf6, 0 0 20px #8b5cf6, 0 0 30px #8b5cf6;
}
@keyframes adminPulsePurple {
  0%, 100% { box-shadow: 0 0 10px #8b5cf6, 0 0 20px #8b5cf6, 0 0 30px #8b5cf6; }
  50% { box-shadow: 0 0 20px #8b5cf6, 0 0 40px #8b5cf6, 0 0 60px #8b5cf6; }
}

.admin-user-badge[data-badge="seller-of-year"] {
  animation: adminRotateGlowOrange 2.5s linear infinite, adminPulseOrange 2s infinite;
  box-shadow: 0 0 15px #f97316, 0 0 30px #f97316, 0 0 45px #f97316;
}
@keyframes adminRotateGlowOrange {
  0% { box-shadow: 0 0 15px #f97316, 0 0 30px #f97316, 0 0 45px #f97316; }
  25% { box-shadow: 15px 0 15px #f97316, 0 0 30px #f97316, 0 0 45px #f97316; }
  50% { box-shadow: 0 15px 15px #f97316, 0 0 30px #f97316, 0 0 45px #f97316; }
  75% { box-shadow: -15px 0 15px #f97316, 0 0 30px #f97316, 0 0 45px #f97316; }
  100% { box-shadow: 0 0 15px #f97316, 0 0 30px #f97316, 0 0 45px #f97316; }
}
@keyframes adminPulseOrange {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}

.admin-user-badge[data-badge="communicator"] {
  animation: adminPulsePink 1.6s infinite, adminBounceIcon 0.6s ease-in-out infinite alternate;
  box-shadow: 0 0 10px #ec4899, 0 0 20px #ec4899, 0 0 30px #ec4899;
}
@keyframes adminPulsePink {
  0%, 100% { box-shadow: 0 0 10px #ec4899, 0 0 20px #ec4899, 0 0 30px #ec4899; }
  50% { box-shadow: 0 0 25px #ec4899, 0 0 40px #ec4899, 0 0 55px #ec4899; }
}
@keyframes adminBounceIcon {
  from { transform: translateY(0); }
  to { transform: translateY(-2px); }
}

.admin-user-badge[data-badge="honest"] {
  animation: adminPulseTeal 1.9s infinite;
  box-shadow: 0 0 10px #14b8a6, 0 0 20px #14b8a6, 0 0 30px #14b8a6;
}
@keyframes adminPulseTeal {
  0%, 100% { box-shadow: 0 0 10px #14b8a6, 0 0 20px #14b8a6, 0 0 30px #14b8a6; }
  50% { box-shadow: 0 0 20px #14b8a6, 0 0 35px #14b8a6, 0 0 50px #14b8a6; }
}

.admin-user-badge[data-badge="legendary-seller"] {
  animation: adminRainbowGlow 3s linear infinite;
  box-shadow: 0 0 15px #eab308, 0 0 30px #eab308, 0 0 45px #eab308;
}
@keyframes adminRainbowGlow {
  0% { box-shadow: 0 0 15px #eab308, 0 0 30px #eab308, 0 0 45px #eab308; }
  25% { box-shadow: 0 0 15px #f59e0b, 0 0 30px #f59e0b, 0 0 45px #f59e0b; }
  50% { box-shadow: 0 0 15px #dc2626, 0 0 30px #dc2626, 0 0 45px #dc2626; }
  75% { box-shadow: 0 0 15px #f59e0b, 0 0 30px #f59e0b, 0 0 45px #f59e0b; }
  100% { box-shadow: 0 0 15px #eab308, 0 0 30px #eab308, 0 0 45px #eab308; }
}

.admin-user-badge[data-badge="deal-maker"] {
  animation: adminPulseEmerald 2s infinite;
  box-shadow: 0 0 10px #059669, 0 0 20px #059669, 0 0 30px #059669;
}
@keyframes adminPulseEmerald {
  0%, 100% { box-shadow: 0 0 10px #059669, 0 0 20px #059669, 0 0 30px #059669; }
  50% { box-shadow: 0 0 20px #059669, 0 0 35px #059669, 0 0 50px #059669; }
}

.admin-user-badge[data-badge="best-price"] {
  animation: adminPulseAmber 1.7s infinite;
  box-shadow: 0 0 10px #d97706, 0 0 20px #d97706, 0 0 30px #d97706;
}
@keyframes adminPulseAmber {
  0%, 100% { box-shadow: 0 0 10px #d97706, 0 0 20px #d97706, 0 0 30px #d97706; }
  50% { box-shadow: 0 0 20px #d97706, 0 0 30px #d97706, 0 0 45px #d97706; }
}

.admin-user-badge[data-badge="popular-seller"] {
  animation: adminPulseRed 1.4s infinite;
  box-shadow: 0 0 10px #dc2626, 0 0 20px #dc2626, 0 0 30px #dc2626;
}
@keyframes adminPulseRed {
  0%, 100% { box-shadow: 0 0 10px #dc2626, 0 0 20px #dc2626, 0 0 30px #dc2626; }
  50% { box-shadow: 0 0 25px #dc2626, 0 0 40px #dc2626, 0 0 55px #dc2626; }
}

.admin-user-badge[data-badge="gamer"] {
  animation: adminPulseViolet 1.6s infinite;
  box-shadow: 0 0 10px #7c3aed, 0 0 20px #7c3aed, 0 0 30px #7c3aed;
}
@keyframes adminPulseViolet {
  0%, 100% { box-shadow: 0 0 10px #7c3aed, 0 0 20px #7c3aed, 0 0 30px #7c3aed; }
  50% { box-shadow: 0 0 20px #7c3aed, 0 0 35px #7c3aed, 0 0 50px #7c3aed; }
}

.admin-user-badge[data-badge="guaranteed"] {
  animation: adminPulseSkyBlue 2s infinite;
  box-shadow: 0 0 10px #0ea5e9, 0 0 20px #0ea5e9, 0 0 30px #0ea5e9;
}
@keyframes adminPulseSkyBlue {
  0%, 100% { box-shadow: 0 0 10px #0ea5e9, 0 0 20px #0ea5e9, 0 0 30px #0ea5e9; }
  50% { box-shadow: 0 0 20px #0ea5e9, 0 0 35px #0ea5e9, 0 0 50px #0ea5e9; }
}

.admin-user-badge[data-badge="bug-hunter"] {
  animation: adminPulseIndigo 1.8s infinite;
  box-shadow: 0 0 10px #6366f1, 0 0 20px #6366f1, 0 0 30px #6366f1;
}
@keyframes adminPulseIndigo {
  0%, 100% { box-shadow: 0 0 10px #6366f1, 0 0 20px #6366f1, 0 0 30px #6366f1; }
  50% { box-shadow: 0 0 20px #6366f1, 0 0 35px #6366f1, 0 0 50px #6366f1; }
}

/* Tab Content */
.admin-tab {
  display: none;
}

.admin-tab.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .admin-container {
    grid-template-columns: 1fr;
  }
  
  .admin-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--admin-border);
  }
}

@media (max-width: 640px) {
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .admin-main {
    padding: 1rem;
  }
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8) !important;
  z-index: 9999 !important;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  padding: 1rem;
}

.modal-content {
  background: var(--admin-surface) !important;
  padding: 2rem !important;
  border-radius: var(--admin-radius) !important;
  width: 100%;
  max-width: 500px !important;
  border: 1px solid var(--admin-border) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}
