/* Admin Server Management Enhanced Styles */

/* Action Buttons Section */
.admin-server-actions-new {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-server-actions-new .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-server-actions-new .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.admin-server-actions-new .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

.admin-server-actions-new .btn-secondary {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
}

.admin-server-actions-new .btn-secondary:hover {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
  transform: translateY(-2px);
}

/* Statistics Cards */
.server-stats-admin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  animation: fadeInUp 0.6s ease-out;
}

.stat-card-admin {
  background: var(--card-background);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.stat-card-admin::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card-admin:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  border-color: var(--primary-color);
}

.stat-card-admin:hover::before {
  opacity: 1;
}

.stat-icon-admin {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon-admin i {
  font-size: 1.75rem;
  color: white;
}

.stat-info-admin h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--text-secondary);
  letter-spacing: -0.02em;
}

.stat-info-admin p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Search and Sort Section */
.server-search-sort {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  align-items: center;
}

.search-box-admin {
  flex: 1;
  min-width: 280px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-admin i {
  position: absolute;
  left: 1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  pointer-events: none;
}

.search-box-admin input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: var(--card-background);
}

.search-box-admin input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sort-box-admin {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-background);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
}

.sort-box-admin:hover {
  border-color: #cbd5e1;
}

.sort-box-admin label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #475569;
  font-size: 0.9rem;
  margin: 0;
  white-space: nowrap;
}

.sort-box-admin i {
  color: #64748b;
}

.sort-box-admin select {
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.sort-box-admin select:hover {
  background: #f8fafc;
}

.sort-box-admin select:focus {
  outline: none;
  background: #f1f5f9;
}

/* Enhanced Toggle Protection Button */
.admin-server-actions-new #toggle-protection-btn {
  position: relative;
  transition: all 0.3s ease;
}

.admin-server-actions-new #toggle-protection-btn .selected-count {
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-server-actions-new #toggle-protection-btn.has-selection {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%) !important;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
  transform: scale(1.02);
}

.admin-server-actions-new #toggle-protection-btn.has-selection:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%) !important;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5) !important;
}

/* Enhanced Server Card Checkbox */
.server-checkbox {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  width: 28px;
  height: 28px;
  background: var(--card-background);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.server-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin: 0;
  accent-color: #8b5cf6;
}

.server-card.selected {
  border: 2px solid #8b5cf6 !important;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2) !important;
  transform: scale(1.02);
}

.server-card.selected .server-checkbox {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
}

.server-card.selected .server-checkbox input[type="checkbox"] {
  accent-color: white;
}

/* Protected Server Visual Enhancement */
.server-card.protected {
  border-left: 4px solid #f59e0b !important;
  background: var(--card-background);
  position: relative;
}

/* Shield next to server name */
.server-card.protected .server-name::after {
  content: ' 🛡️';
  color: #f59e0b;
  font-size: 0.9em;
  margin-left: 0.5rem;
}

/* Alternative: Shield as separate element next to server name */
.server-card.protected .server-name {
  position: relative;
}

.server-card.protected .server-name::before {
  content: '🛡️';
  color: #f59e0b;
  font-size: 0.9em;
  margin-right: 0.5rem;
}

.server-card.protected .protection-icon {
  font-size: 1.1rem;
  animation: pulse 2s ease-in-out infinite;
}

.server-card.protected .protection-icon:hover {
  animation-play-state: paused;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

/* Empty State */
.empty-state-admin {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 16px;
  border: 2px dashed #cbd5e1;
  margin: 2rem 0;
  animation: fadeIn 0.6s ease-out;
}

.empty-state-admin i {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

.empty-state-admin h3 {
  font-size: 1.5rem;
  color: #475569;
  margin: 0 0 0.5rem 0;
  font-weight: 700;
}

.empty-state-admin p {
  color: #64748b;
  margin: 0 0 1.5rem 0;
  font-size: 1rem;
}

.empty-state-admin .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Loading State */
.loading-servers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.server-card-skeleton {
  background: var(--card-background);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid #f1f5f9;
  animation: pulse-skeleton 1.5s ease-in-out infinite;
}

.skeleton-header {
  height: 24px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.skeleton-line {
  height: 16px;
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.skeleton-line:last-child {
  width: 60%;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-skeleton {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Fade In Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .admin-server-actions-new {
    flex-direction: column;
  }
  
  .admin-server-actions-new .btn {
    width: 100%;
    justify-content: center;
  }
  
  .server-stats-admin {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .stat-card-admin {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  
  .stat-icon-admin {
    width: 50px;
    height: 50px;
  }
  
  .stat-icon-admin i {
    font-size: 1.5rem;
  }
  
  .stat-info-admin h3 {
    font-size: 1.5rem;
  }
  
  .server-search-sort {
    flex-direction: column;
  }
  
  .search-box-admin {
    width: 100%;
  }
  
  .sort-box-admin {
    width: 100%;
    justify-content: space-between;
  }
}


