  :root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-bg: #f8fafc;
    --neutral-50: #f9fafb;
    --neutral-100: #f3f4f6;
    --neutral-200: #e5e7eb;
    --neutral-300: #d1d5db;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  }

 

  /* Stats Container Styling */
  .stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
    padding: 0 1rem;
  }

  .stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
    border: 1px solid var(--neutral-200);
    position: relative;
  }

  .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--neutral-300);
  }

  .stat-card:nth-child(1) {
    border: 3px solid var(--primary-color);
  }

  .stat-card:nth-child(2) {
    border: 3px solid var(--success-color);
  }

  .stat-card:nth-child(3) {
    border: 3px solid var(--danger-color);
  }

  .stat-card:nth-child(4) {
    border: 3px solid var(--primary-color);
  }

  .stat-card:nth-child(5) {
    border: 3px solid var(--success-color);
  }

  .stat-card:nth-child(6) {
    border: 3px solid var(--danger-color);
  }

  .stat-card h4 {
    color: var(--neutral-600);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
  }

  .stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--neutral-900);
    line-height: 1.2;
    margin: 0;
    font-family: 'Inter', sans-serif;
  }

  .stat-card:nth-child(1) .stat-value {
    color: var(--primary-color);
  }

  .stat-card:nth-child(2) .stat-value {
    color: var(--success-color);
  }

  .stat-card:nth-child(3) .stat-value {
    color: var(--danger-color);
  }

  .stat-card:nth-child(4) .stat-value {
    color: var(--primary-color);
  }

  .stat-card:nth-child(5) .stat-value {
    color: var(--success-color);
  }

  .stat-card:nth-child(6) .stat-value {
    color: var(--danger-color);
  }

 

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Dashboard Header */
  .dashboard-header {
    margin: 2rem 1rem 1rem 1rem;
  }

  .dashboard-header input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    background: white;
  }

  .dashboard-header input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  }

  .dashboard-header input::placeholder {
    color: #94a3b8;
  }

  .report-header {
    background: linear-gradient(119.16deg, #8D4DF3 0%, #0120D4 100%);
    border: none;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem;
    padding: 0 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
    padding: 1rem;
  }

  .search-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .search-control input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--neutral-300);
    border-radius: 6px;
    font-size: 0.875rem;
    width: 250px;
  }

  .search-control input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
  }

  .pagination-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--neutral-600);
  }

  .pagination-control select {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--neutral-300);
    border-radius: 4px;
    font-size: 0.875rem;
  }

  .table-container {
    margin: 0 1rem 1rem 1rem;
    padding: 0;
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--neutral-200);
  }

  #affiliateReportTable {
    margin: 0;
    border: none;
    width: 100%;
  }

  /* Disable DataTables for custom-table */
  .custom-table {
    display: table !important;
  }

  .custom-table * {
    box-sizing: border-box;
  }

  #affiliateReportTable thead th {
    background: var(--neutral-50);
    border: none;
    padding: 1rem 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--neutral-700);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--neutral-200);
  }

  #affiliateReportTable tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--neutral-100);
    font-size: 0.875rem;
    color: var(--neutral-700);
  }

  #affiliateReportTable tbody tr {
    transition: all 0.2s ease;
  }

  #affiliateReportTable tbody tr:hover {
    background: var(--neutral-50);
  }

  /* #affiliateReportTable tbody tr:hover {
                        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
                        transform: scale(1.01);
                        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
                    } */

  .status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: none;
  }

  .status-waiting {
    border: 2px solid #F59E0B;
    color: #F59E0B;
  }

  .status-approved {
    border: 2px solid #3B82F6;
    color: #3B82F6;
  }

  .status-cancelled {
    border: 2px solid #EF4444;
    color: #EF4444;
  }

  .status-received {
    border: 2px solid #10B981;
    color: #10B981;
  }

  .type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border: none;
  }

  .type-badge.product {
    color: #3B82F6;
    border: 2px solid #3B82F6;
  }

  .type-badge.form {
    color: #10B981;
    border: 2px solid #10B981;
  }

  .currency {
    font-weight: 600;
    color: #EF4444;
  }

  .percentage {
    color: var(--neutral-700);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
  }

  /* Custom Table Styling */
  #affiliateReportTable tbody tr {
    transition: all 0.2s ease;
  }

  #affiliateReportTable tbody tr:hover {
    background: var(--neutral-50);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .text-center {
    text-align: center;
  }

  /* Dashboard Container */
  .dashboard-container {
    margin-top: 70px;
    padding: 0 1rem;
  }

  /* Responsive Design */
  @media (max-width: 992px) {
    .stats-container {
      grid-template-columns: repeat(2, 1fr);
      grid-template-rows: repeat(3, 1fr);
    }
  }

  @media (max-width: 768px) {
    .dashboard-container {
      margin-top: 60px;
      padding: 0 0.5rem;
    }

    .stats-container {
      grid-template-columns: 1fr;
      grid-template-rows: auto;
      gap: 1rem;
      padding: 0;
      margin: 1rem 0;
    }

    .stat-card {
      padding: 1.25rem;
      border-radius: 8px;
    }

    .stat-value {
      font-size: 1.5rem;
    }

    .dashboard-header {
      margin: 1rem 0;
    }

    .dashboard-header input {
      max-width: 100%;
    }

    .report-section {
      margin: 1rem 0;
    }

    .report-header {
      padding: 1rem;
      font-size: 1rem;
      margin: 0.5rem;
    }

    .table-container {
      margin: 0.5rem;
    }

    #affiliateReportTable {
      font-size: 0.75rem;
    }

    #affiliateReportTable thead th,
    #affiliateReportTable tbody td {
      padding: 0.75rem 0.5rem;
    }
  }

  @media (max-width: 480px) {
    .dashboard-container {
      margin-top: 50px;
      padding: 0 0.25rem;
    }

    .stats-container {
      gap: 0.75rem;
      padding: 0;
      margin: 0.75rem 0;
    }

    .stat-card {
      padding: 1rem;
    }

    .stat-value {
      font-size: 1.25rem;
    }

    .stat-card h4 {
      font-size: 0.75rem;
    }

    .report-header {
      padding: 0.75rem;
      font-size: 0.875rem;
      margin: 0.25rem;
    }

    .table-container {
      margin: 0.25rem;
    }

    #affiliateReportTable thead th,
    #affiliateReportTable tbody td {
      padding: 0.5rem 0.25rem;
      font-size: 0.7rem;
    }
  }

  /* Loading Animation */
  .loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
  }

  @keyframes shimmer {
    0% {
      background-position: -200% 0;
    }
    100% {
      background-position: 200% 0;
    }
  }

  .icon-badge {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
  }

  .pagination-bottom {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--neutral-200);
  }

  .pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  .btn-pagination {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--neutral-300);
    background: white;
    color: var(--neutral-600);
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .btn-pagination:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
  }

  .btn-pagination.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
  }

  /* Campaign Details Modal Styling */
  .campaign-modal-header {
    background: linear-gradient(119.16deg, #8D4DF3 0%, #0120D4 100%);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
  }

  .campaign-modal-header .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: white;
  }

  .campaign-modal-header .btn-close {
    color: white;
    font-size: 1.25rem;
  }

  .campaign-modal-header .btn-close:hover {
    opacity: 0.8;
  }

  .modal-body {
    padding: 2rem;
  }

  .user-info-section {
    margin-bottom: 1.5rem;
  }

  .user-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--neutral-900);
    margin-bottom: 1rem;
  }

  .user-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .detail-item {
    /* display: flex;
    justify-content: space-between;
    align-items: center; */
    padding: 0.5rem 0;
  }

  .detail-label {
    font-weight: 500;
    color: var(--neutral-600);
    /* min-width: 150px; */
  }

  .detail-value {
    font-weight: 500;
    color: var(--neutral-900);
    /* text-align: right; */
  }

  .divider-dotted {
    border-top: 2px solid var(--neutral-300);
    margin: 1.5rem 0;
  }

  .product-info-section {
    margin-top: 1.5rem;
  }

  .product-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }

  .product-type-badge {
    background: #3B82F6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
  }

  .campaign-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--neutral-900);
  }

  .campaign-status-badge {
    background: #10B981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
  }

  .commission-value {
    color: #EF4444 !important;
    font-weight: 600;
  }

  .action-section {
    display: flex;
    justify-content: flex-end;
  }

  .btn-status {
    background: #F59E0B;
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
  }

  .btn-status:hover {
    background: #D97706;
    color: #000;
  }

  .btn-status.btn-waiting {
    background: #F59E0B;
    color: #000;
  }

  .btn-status.btn-approved {
    background: #3B82F6;
    color: white;
  }

  .btn-status.btn-cancelled {
    background: #EF4444;
    color: white;
  }

  .btn-status.btn-received {
    background: #10B981;
    color: white;
  }

  /* Modal responsive */
  @media (max-width: 768px) {
    .modal-body {
      padding: 1.5rem;
    }

    .product-row {
      /* flex-direction: column; */
      /* align-items: flex-start;
      gap: 0.5rem; */
    }

    .detail-item {
      flex-direction: column;
      align-items: flex-start;
      gap: 0.25rem;
    }

    .detail-value {
      text-align: left;
    }

    .action-section {
      justify-content: center;
    }
  }
