
.dataTables_wrapper {
  margin-bottom: 1.5rem !important;
  padding-bottom: 0.5rem;

  .table-responsive {
    margin-bottom: 1.75rem !important;
  }

  table.dataTable,
  .table {
    margin-bottom: 0 !important;
  }

  .row.align-items-center,
  .row:has(.pagination),
  .row:has(.dataTables_paginate),
  .row:has(.dataTables_info) {
    margin-top: 1.75rem !important;
    padding-top: 1.25rem !important;
    padding-bottom: 1rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    border-top: 1px solid #edf2f7 !important;
  }

  .dataTables_length {
    label {
      font-size: 0.8125rem;
      color: #64748b;
      font-weight: 500;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 0;
    }

    select {
      padding: 5px 28px 5px 10px;
      font-size: 0.8125rem;
      border-radius: 8px;
      border: 1px solid #e2e8f0;
      background-color: #f8fafc;
      color: #334155;
      font-weight: 500;
      transition: all 0.15s ease;

      &:hover {
        border-color: #cbd5e1;
        background-color: #ffffff;
      }

      &:focus {
        border-color: var(--primary-color, #2b5240);
        outline: none;
        box-shadow: 0 0 0 3px rgba(43, 82, 64, 0.1);
        background-color: #ffffff;
      }
    }
  }

  .dataTables_info {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    padding-top: 0 !important;
  }

  .pagination {
    margin: 0 !important;
    gap: 4px;

    .page-item {
      .page-link {
        color: #475569;
        font-size: 0.8125rem;
        font-weight: 500;
        padding: 6px 12px;
        border-radius: 8px !important;
        border: 1px solid transparent;
        background-color: transparent;
        transition: all 0.15s ease-in-out;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 34px;
        height: 34px;

        &:hover {
          color: var(--primary-color, #2b5240);
          background-color: #f1f5f9;
          border-color: #e2e8f0;
        }

        &:focus {
          box-shadow: 0 0 0 3px rgba(43, 82, 64, 0.12);
        }
      }

      &.active .page-link {
        background-color: var(--primary-color, #2b5240) !important;
        border-color: var(--primary-color, #2b5240) !important;
        color: #ffffff !important;
        font-weight: 600;
        box-shadow: 0 2px 6px rgba(43, 82, 64, 0.28);
      }

      &.disabled .page-link {
        color: #94a3b8;
        background-color: transparent;
        border-color: transparent;
        opacity: 0.45;
        cursor: not-allowed;
      }
    }
  }

  .dataTables_processing {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    padding: 12px 24px !important;
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
    color: var(--primary-color, #2b5240) !important;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    z-index: 1000 !important;
  }

  .dataTables_filter {
    display: none !important;
  }

  .dropdown-menu {
    z-index: 1050;
    border-radius: 10px;
    border: 1px solid #eef2f6;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    padding: 6px;

    .dropdown-divider {
      margin: 4px 0;
      border-color: #f1f5f9;
    }
  }

  .dropdown-item {
    font-size: 0.8125rem;
    padding: 7px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    color: #334155;
    font-weight: 500;
    transition: all 0.12s ease;

    &:hover {
      background-color: #f8fafc;
      color: var(--primary-color, #2b5240);
    }

    &.text-danger:hover {
      background-color: #fef2f2;
      color: #dc2626 !important;
    }
  }
}

.table {
  .btn-icon.btn-light {
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;

    &:hover, &:focus {
      background-color: #f8fafc;
      color: var(--primary-color, #2b5240);
      border-color: #cbd5e1;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    }
  }
}

.table-responsive > .dataTables_wrapper {
  > .row.align-items-center,
  > .row:has(.pagination),
  > .row:has(.dataTables_paginate) {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.card {
  &:has(.table-responsive),
  &:has(.dataTables_wrapper),
  &:has(table.dataTable) {
    margin-bottom: 2.5rem !important;

    > .card-body {
      padding-bottom: 2.25rem !important;
    }
  }
}

