/* ========== CONTAINER ========== */
.members-container {
  max-width: 98%;
  padding: 0 20px;
  margin: 0 auto;
}

/* ========== HERO SECTION ========== */
.members-hero {
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 80px 20px;
  border-radius: 24px;
  margin-bottom: 40px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.hero-gradient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero-icon-container {
  margin-bottom: 30px;
}

.icon-circle {
  width: 100px;
  height: 100px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: float 3s ease-in-out infinite;
}

.icon-circle i {
  font-size: 3rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-main-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-description {
  font-size: 1.2rem;
  opacity: 0.95;
}

.floating-element {
  position: absolute;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float-random 15s ease-in-out infinite;
}

.element-1 { top: 10%; left: 5%; animation-delay: 0s; }
.element-2 { top: 60%; right: 10%; animation-delay: -5s; }
.element-3 { bottom: 20%; left: 15%; animation-delay: -10s; }

@keyframes float-random {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ========== STATS CARDS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--stat-color), transparent);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.stat-total { --stat-color: #667eea; }
.stat-active { --stat-color: #28a745; }
.stat-inactive { --stat-color: #6c757d; }

.stat-icon-box {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--stat-color), var(--stat-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #2c3e50;
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

/* ========== SEARCH & FILTER ========== */
.search-filter-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.search-input-group {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1.2rem;
}

.search-input {
  width: 100%;
  padding: 12px 20px 12px 50px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.search-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.filter-select {
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  background: #f8f9fa;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* ========== TABLE ========== */
.table-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 40px;
}

.table-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.table-wrapper {
  overflow-x: auto;
  padding: 20px;
}

.members-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 0.95rem;
}

.members-table thead th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
  padding: 15px 12px;
  text-align: center;
  white-space: nowrap;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.members-table tbody tr {
  background: #f8f9ff;
  transition: all 0.3s ease;
}

.members-table tbody tr:hover {
  background: linear-gradient(90deg, #e8ecff, #f0f4ff);
  transform: scale(1.01);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.members-table tbody td {
  padding: 15px 12px;
  text-align: center;
  vertical-align: middle;
}

.user-id-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-block;
}

.status-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
}

.status-active {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.status-inactive {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: white;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-main-title {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .search-input-group {
    flex-direction: column;
  }
  
  .search-box {
    width: 100%;
  }
  
  .members-table {
    font-size: 0.85rem;
  }
}

/* Page Hero */
.page-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 60px 20px;
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--stat-color);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-card.stat-primary { --stat-color: #0d6efd; }
.stat-card.stat-secondary { --stat-color: #6c757d; }
.stat-card.stat-info { --stat-color: #0dcaf0; }
.stat-card.stat-warning { --stat-color: #ffc107; }
.stat-card.stat-danger { --stat-color: #dc3545; }
.stat-card.stat-success { --stat-color: #198754; }

.stat-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: var(--stat-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.stat-details h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  color: #2c3e50;
}

.stat-details p {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 0;
}

.stat-trend {
  margin-left: auto;
  font-size: 1.2rem;
}

.stat-trend.up { color: #198754; }
.stat-trend.down { color: #dc3545; }

/* Filter Card */
.filter-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.filter-header {
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.filter-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.filter-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 8px;
}

.filter-group .form-control,
.filter-group .form-select {
  border-radius: 10px;
  border: 1px solid #dee2e6;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.filter-group .form-control:focus,
.filter-group .form-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  outline: none;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.btn-filter,
.btn-export {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-filter {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-filter:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-export {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: white;
}

.btn-export:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
  color: white;
}

/* Table Card */
.table-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.table-header h5 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.record-count {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.modern-table thead th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 15px;
  border: none;
  text-align: left;
}

.modern-table thead th:first-child {
  border-radius: 10px 0 0 10px;
}

.modern-table thead th:last-child {
  border-radius: 0 10px 10px 0;
}

.modern-table tbody tr {
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.modern-table tbody tr:hover {
  background: #e9ecef;
  transform: scale(1.01);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.modern-table tbody td {
  padding: 15px;
  border: none;
}

.modern-table tbody tr td:first-child {
  border-radius: 10px 0 0 10px;
}

.modern-table tbody tr td:last-child {
  border-radius: 0 10px 10px 0;
}

.badge-id,
.badge-score,
.badge-gift {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.badge-id {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.badge-score {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
}

.badge-gift {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
}

.username {
  font-weight: 500;
  color: #495057;
}

.has-referral {
  color: #198754;
  font-weight: 500;
}

.no-referral {
  color: #6c757d;
}

.date {
  color: #6c757d;
  font-size: 0.9rem;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-action:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

/* Pagination */
.pagination-nav {
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.pagination {
  display: flex;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-item .page-link {
  padding: 8px 15px;
  border-radius: 8px;
  border: none;
  background: #f8f9fa;
  color: #495057;
  text-decoration: none;
  transition: all 0.3s ease;
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.page-item .page-link:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  transform: translateY(-2px);
}

.page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  color: #6c757d;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .filter-row {
    grid-template-columns: 1fr;
  }
  
  .table-responsive {
    overflow-x: auto;
  }
}
