/* ========== CONTAINER WIDTH ========== */
.shared-rewards-container {
  max-width: 98%;
  padding: 0 15px;
  margin: 0 auto;
  max-width: 1920px;
}

/* ========== HERO SECTION ========== */
.shared-rewards-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 OVERVIEW ========== */
.stats-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.stat-overview-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-overview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--stat-color), transparent);
}

.stat-overview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.stat-today { --stat-color: #0dcaf0; }
.stat-week { --stat-color: #0d6efd; }
.stat-month { --stat-color: #ffc107; }
.stat-total { --stat-color: #198754; }

.stat-icon {
  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;
  opacity: 0.9;
}

.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;
}

.stat-trend {
  font-size: 1.5rem;
  color: var(--stat-color);
  opacity: 0.3;
}

/* ========== CHART SECTION ========== */
.chart-modern-card {
  background: white;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-left h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.chart-wrapper {
  position: relative;
  height: 350px;
}

/* ========== QUICK ACTIONS ========== */
.quick-actions-modern {
  margin-bottom: 30px;
}

.section-header {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 20px;
}

.actions-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.action-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 20px;
}

.action-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.search-form-modern,
.export-form-modern {
  flex: 1;
}

.search-input-modern {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input-modern:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.date-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.date-input-modern {
  padding: 10px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 0.9rem;
}

.export-btn-modern {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.export-btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* ========== FILTERS ========== */
.filters-modern-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.filters-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.date-filter-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.filter-input {
  padding: 8px 12px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 0.9rem;
}

.filter-btn {
  padding: 8px 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.quantity-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  color: #495057;
}

.count-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
}

.status-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-filter-btn {
  padding: 10px 20px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  text-decoration: none;
  color: #495057;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-filter-btn:hover {
  transform: translateY(-2px);
}

.status-filter-btn.active,
.status-filter-btn.pending.active {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
  border-color: transparent;
}

.status-filter-btn.approve.active {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-color: transparent;
}

.status-filter-btn.reject.active {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border-color: transparent;
}

/* ========== TABLE ========== */
.table-modern-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  margin-bottom: 30px;
}

.table-card-header {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.table-container-modern {
  overflow-x: auto;
  padding: 5px;
}

/* ========== TABLE SIZE REDUCTION - 70% ========== */
.rewards-table-modern {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  font-size: 100%;
}

.rewards-table-modern thead th {
  background: #f8f9fa;
  color: #495057;
  font-weight: 600;
  padding: 10px 8px;
  text-align: center;
  white-space: nowrap;
  font-size: 85%;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  z-index: 10;
}

.rewards-table-modern tbody tr {
  transition: all 0.3s ease;
  background: #f8f9ff;
}

.rewards-table-modern tbody tr:hover {
  background: linear-gradient(90deg, #e8ecff, #f0f4ff);
  transform: scale(1.01);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.rewards-table-modern tbody td {
  padding: 5px 2px;
  text-align: center;
  vertical-align: middle;
  font-size: 90%;
}

.date-cell {
  font-size: 70%;
  white-space: nowrap;
}

.status-indicator {
  font-size: 1rem;
}

.copyable {
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 90%;
}

.copyable:hover {
  color: #667eea;
  text-decoration: underline;
}

.link-preview {
  color: #0d6efd;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  font-size: 70%;
}

.platform-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 70%;
  font-weight: 600;
  display: inline-block;
}

.amount-display {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 5px 12px;
  border-radius: 10px;
  font-weight: 700;
  display: inline-block;
  font-size: 70%;
}

.code-badge {
  background: #ffc107;
  color: #000;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-family: monospace;
  font-size: 70%;
}

.verify-badge {
  padding: 5px 12px;
  border-radius: 18px;
  font-weight: 600;
  font-size: 70%;
  display: inline-block;
}

.verify-0 {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: white;
}

.verify-1 {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.verify-2 {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
}

.btn-edit-modern {
  padding: 6px 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 70%;
}

.btn-edit-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.remark-cell {
  font-size: 70%;
  max-width: 150px;
}

/* ✅ Truncate Cell Styles */
.truncate-cell {
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(102, 126, 234, 0.05);
}

.truncate-cell.truncated {
  background: rgba(102, 126, 234, 0.1);
}

.truncate-cell.truncated:hover {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
  font-weight: 600;
  transform: scale(1.05);
}

.truncate-cell.expanded {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  font-weight: 600;
  white-space: normal;
  word-wrap: break-word;
  max-width: 300px;
  text-align: left;
}

.truncate-cell.expanded:hover {
  background: rgba(40, 167, 69, 0.2);
}

/* ========== MODAL ========== */
.modal-backdrop {
  display: none !important;
}

.modal {
  background-color: rgba(0, 0, 0, 0.5) !important;
  z-index: 10500 !important;
}

.modal.show {
  display: block !important;
}

.modal.show .modal-dialog {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: 20px !important;
  transform: translateY(-100px) !important;
  max-width: 600px !important;
  width: auto !important;
}

.modern-modal .modal-dialog {
  max-width: 550px;
  width: 90%;
  min-width: 400px;
}

.modern-modal .modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 10501;
  margin: 0 auto;
  width: 100%;
}

.modern-modal-header {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border-radius: 20px 20px 0 0;
  padding: 20px 30px;
  border-bottom: none;
}

.modern-modal-header .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.modern-modal-header .btn-close {
  background-color: rgba(255, 255, 255, 0.3);
  opacity: 1;
  border-radius: 50%;
  padding: 0.5rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  filter: brightness(0) invert(1);
}

.modern-modal-header .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.5);
  transform: rotate(90deg);
}

.modern-modal .modal-body {
  padding: 30px;
  max-height: 60vh;
  overflow-y: auto;
}

.modern-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: #fff;
  cursor: pointer;
}

.modern-select:focus {
  outline: none;
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.1);
}

.modern-select option {
  padding: 10px;
  font-size: 0.95rem;
}

.modern-modal .modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 20px 20px;
  background-color: #f8f9fa;
}

.btn-reject-modern {
  padding: 12px 30px;
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-reject-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
  background: linear-gradient(135deg, #c82333, #bd2130);
}

.btn-reject-modern:active {
  transform: translateY(0);
}

/* ========== PAGINATION ========== */
.pagination-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.pagination-controls {
  flex: 1;
}

.pagination-controls nav {
  display: flex;
  justify-content: center;
}

.pagination-list {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-list li {
  margin: 0;
}

.page-btn {
  padding: 10px 16px;
  background: white;
  border: 2px solid #e9ecef;
  color: #495057;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  font-size: 0.95rem;
}

.page-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
}

.page-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.page-btn.first,
.page-btn.last {
  font-weight: 700;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-color: #667eea;
  color: #667eea;
}

.page-btn.first:hover,
.page-btn.last:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.per-page-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  border-radius: 12px;
  border: 2px solid #e9ecef;
}

.per-page-form label {
  font-weight: 600;
  color: #495057;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.95rem;
}

.per-page-select {
  padding: 8px 16px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  background: white;
  color: #495057;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  min-width: 80px;
}

.per-page-select:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.per-page-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-main-title {
    font-size: 2rem;
  }
  
  .stats-overview-grid {
    grid-template-columns: 1fr;
  }
  
  .actions-row {
    grid-template-columns: 1fr;
  }
  
  .filters-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .table-container-modern {
    overflow-x: auto;
  }
  
  .pagination-modern {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }
  
  .pagination-controls {
    width: 100%;
  }
  
  .pagination-list {
    gap: 5px;
    font-size: 0.85rem;
  }
  
  .page-btn {
    padding: 8px 12px;
    min-width: 40px;
    font-size: 0.85rem;
  }
  
  .per-page-form {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }
  
  .per-page-select {
    flex: 1;
    max-width: 120px;
  }
  
  .rewards-table-modern {
    font-size: 65%;
  }
  
  .rewards-table-modern thead th,
  .rewards-table-modern tbody td {
    padding: 8px 6px;
  }
  
  .truncate-cell.expanded {
    max-width: 200px;
  }
  
  .modern-modal .modal-dialog {
    width: 95%;
    max-width: 95%;
    min-width: auto;
  }
  
  .modern-modal .modal-body {
    max-height: 50vh;
    padding: 20px;
  }
  
  .modal.show .modal-dialog {
    padding: 10px !important;
    transform: translateY(-50px) !important;
    max-width: 95% !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .modern-modal .modal-dialog {
    max-width: 500px;
    min-width: 450px;
  }
  
  .pagination-modern {
    padding: 18px 25px;
  }
  
  .page-btn {
    padding: 9px 14px;
    font-size: 0.9rem;
  }
}

@media (min-width: 1025px) {
  .modern-modal .modal-dialog {
    max-width: 550px;
    min-width: 500px;
  }
}
